mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-30 03:22:14 +00:00
Fix unit test
This commit is contained in:
parent
18e238e7c6
commit
753ea3ab88
@ -548,6 +548,7 @@ public:
|
|||||||
void setZooKeeperLog(std::shared_ptr<DB::ZooKeeperLog> zk_log_);
|
void setZooKeeperLog(std::shared_ptr<DB::ZooKeeperLog> zk_log_);
|
||||||
|
|
||||||
UInt32 getSessionUptime() const { return static_cast<UInt32>(session_uptime.elapsedSeconds()); }
|
UInt32 getSessionUptime() const { return static_cast<UInt32>(session_uptime.elapsedSeconds()); }
|
||||||
|
|
||||||
bool hasReachedDeadline() const { return impl->hasReachedDeadline(); }
|
bool hasReachedDeadline() const { return impl->hasReachedDeadline(); }
|
||||||
|
|
||||||
void setServerCompletelyStarted();
|
void setServerCompletelyStarted();
|
||||||
|
@ -26,12 +26,16 @@ std::optional<RaftServerConfig> RaftServerConfig::parse(std::string_view server)
|
|||||||
if (!with_id_endpoint && !with_server_type && !with_priority)
|
if (!with_id_endpoint && !with_server_type && !with_priority)
|
||||||
return std::nullopt;
|
return std::nullopt;
|
||||||
|
|
||||||
const std::string_view id_str = parts[0];
|
std::string_view id_str = parts[0];
|
||||||
if (!id_str.starts_with("server."))
|
if (!id_str.starts_with("server."))
|
||||||
return std::nullopt;
|
return std::nullopt;
|
||||||
|
|
||||||
|
id_str = id_str.substr(7);
|
||||||
|
if (auto eq_pos = id_str.find('='); std::string_view::npos != eq_pos)
|
||||||
|
id_str = id_str.substr(0, eq_pos);
|
||||||
|
|
||||||
Int32 id;
|
Int32 id;
|
||||||
if (!tryParse(id, std::next(id_str.begin(), 7)))
|
if (!tryParse(id, id_str))
|
||||||
return std::nullopt;
|
return std::nullopt;
|
||||||
if (id <= 0)
|
if (id <= 0)
|
||||||
return std::nullopt;
|
return std::nullopt;
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <map>
|
#include <map>
|
||||||
#include <mutex>
|
#include <mutex>
|
||||||
#include <unordered_map>
|
#include <unordered_map>
|
||||||
@ -12,6 +13,7 @@
|
|||||||
#include <Common/Stopwatch.h>
|
#include <Common/Stopwatch.h>
|
||||||
#include <Common/ThreadPool.h>
|
#include <Common/ThreadPool.h>
|
||||||
|
|
||||||
|
|
||||||
namespace Poco
|
namespace Poco
|
||||||
{
|
{
|
||||||
class Logger; // NOLINT(cppcoreguidelines-virtual-class-destructor)
|
class Logger; // NOLINT(cppcoreguidelines-virtual-class-destructor)
|
||||||
|
Loading…
Reference in New Issue
Block a user