X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=tests%2Fpool.cc;h=8f2a1587a69fc1dce1fffb90cd79f8acc704d877;hb=e82f6a9bffe896a579ae5013a9cab51180cd003d;hp=e7929232b1da5334b96fec903b3a6538058ac7e6;hpb=dc421179c0d159f1ca8a6b2b64b89163a7e0c639;p=m6w6%2Flibmemcached diff --git a/tests/pool.cc b/tests/pool.cc index e7929232..8f2a1587 100644 --- a/tests/pool.cc +++ b/tests/pool.cc @@ -35,12 +35,12 @@ * */ -#include +#include #include #include #include -#include +#include #include #include @@ -48,10 +48,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);