X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=tests%2Fpool.cc;h=f1972668cdddb1472369dc24a538519e46b7b836;hb=b90c798532ec8d4d4e2f5c1eea1ec18354dd2070;hp=e7929232b1da5334b96fec903b3a6538058ac7e6;hpb=2e5705daa52faa457f104864a27cfbba98ed568e;p=m6w6%2Flibmemcached diff --git a/tests/pool.cc b/tests/pool.cc index e7929232..f1972668 100644 --- a/tests/pool.cc +++ b/tests/pool.cc @@ -36,11 +36,14 @@ */ #include +#include + +using namespace libtest; #include #include #include -#include +#include #include #include @@ -48,10 +51,17 @@ test_return_t memcached_pool_test(memcached_st *) { - const char *config_string= "--SERVER=host10.example.com --SERVER=host11.example.com --SERVER=host10.example.com"; + memcached_return_t rc; + const char *config_string= "--SERVER=host10.example.com --SERVER=host11.example.com --SERVER=host10.example.com --POOL-MIN=10 --POOL-MAX=32"; + + char buffer[2048]; + rc= libmemcached_check_configuration(config_string, sizeof(config_string) -1, buffer, sizeof(buffer)); + + test_true_got(rc != MEMCACHED_SUCCESS, buffer); + memcached_pool_st* pool= memcached_pool(config_string, strlen(config_string)); + test_true_got(pool, strerror(errno)); - memcached_return_t rc; memcached_st *memc= memcached_pool_pop(pool, false, &rc); test_true(rc == MEMCACHED_SUCCESS);