From: Michael Wallner Date: Fri, 30 Oct 2020 12:38:16 +0000 (+0100) Subject: remove ambigous Cluster ctor X-Git-Tag: 1.1.0-beta1~145 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=5a18a901fcfc7b5bef004eb9110a2386fe87224a;p=m6w6%2Flibmemcached remove ambigous Cluster ctor --- diff --git a/test/lib/Cluster.cpp b/test/lib/Cluster.cpp index 54de9398..3ecc6e9a 100644 --- a/test/lib/Cluster.cpp +++ b/test/lib/Cluster.cpp @@ -7,9 +7,6 @@ Cluster::Cluster(Server serv, uint16_t cnt) : count{cnt} , proto{move(serv)} { - if (count < 4) { - count = stoi(getenv_else("MEMCACHED_CLUSTER", "4")); - } if (!count) { count = 1; } @@ -18,13 +15,6 @@ Cluster::Cluster(Server serv, uint16_t cnt) } } -Cluster::Cluster(vector servers) -: count{servers.size()} -, cluster{move(servers)} -{ - -} - Cluster::~Cluster() { stop(); wait(); diff --git a/test/lib/Cluster.hpp b/test/lib/Cluster.hpp index 4e151020..d2b93b9c 100644 --- a/test/lib/Cluster.hpp +++ b/test/lib/Cluster.hpp @@ -20,8 +20,7 @@ class Cluster { public: - explicit Cluster(Server serv, uint16_t cnt = 0); - explicit Cluster(vector servers); + explicit Cluster(Server serv, uint16_t cnt = 3); ~Cluster(); Cluster(const Cluster &c) = delete; diff --git a/test/tests/memcached/errors.cpp b/test/tests/memcached/errors.cpp index 4b3b4684..db557431 100644 --- a/test/tests/memcached/errors.cpp +++ b/test/tests/memcached/errors.cpp @@ -17,7 +17,7 @@ TEST_CASE("memcached_errors") { } SECTION("dead servers") { - MemcachedCluster test{Cluster{vector{Server{MEMCACHED_BINARY, {"-p", random_port_string("-p")}}}}}; + MemcachedCluster test{Cluster{Server{MEMCACHED_BINARY, {"-p", random_port_string("-p")}}, 1}}; auto memc = &test.memc; REQUIRE_SUCCESS(memcached_set(memc, S("foo"), nullptr, 0, 0, 0));