X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=tests%2Fpool.cc;h=ed5016f0f13c2dfa2f4f9358bf4c802c925dedc2;hb=9cde1fdc1bbd49775c75a83e44c942354129f1d5;hp=e7929232b1da5334b96fec903b3a6538058ac7e6;hpb=2e5705daa52faa457f104864a27cfbba98ed568e;p=awesomized%2Flibmemcached diff --git a/tests/pool.cc b/tests/pool.cc index e7929232..ed5016f0 100644 --- a/tests/pool.cc +++ b/tests/pool.cc @@ -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);