X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=test%2Flib%2FCluster.cpp;h=e1375bfde90ed50c65fcb52a3f0cff54c3be35fa;hb=c6067ad903b3f17eb8d95bc0ba5d2079a91ee28c;hp=ee7fcbf24f409596fd5f6d404970f7abeea9002e;hpb=36c2351bfeb343f4d6da922cdee58f4bcdcd7e08;p=awesomized%2Flibmemcached diff --git a/test/lib/Cluster.cpp b/test/lib/Cluster.cpp index ee7fcbf2..e1375bfd 100644 --- a/test/lib/Cluster.cpp +++ b/test/lib/Cluster.cpp @@ -7,11 +7,11 @@ Cluster::Cluster(Server serv, uint16_t cnt) : count{cnt} , proto{move(serv)} { - if (!cnt) { - count = thread::hardware_concurrency()/2; - if (count < 4) { - count = 4; - } + if (count < 4) { + count = stoi(getenv_else("MEMCACHED_CLUSTER", "4")); + } + if (!count) { + count = 1; } reset(); }