X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=tests%2Flibmemcached-1.0%2Fpool.cc;h=9da4a0f953d235b736acdc026df232e5d0859eef;hb=674c7578fa870c3b57e81e765c355ce98434b310;hp=10450dac846897b7b79c4c18427aac0a89cb65df;hpb=743312bb2d2f9ed5425670ff29de418182d884e0;p=m6w6%2Flibmemcached diff --git a/tests/libmemcached-1.0/pool.cc b/tests/libmemcached-1.0/pool.cc index 10450dac..9da4a0f9 100644 --- a/tests/libmemcached-1.0/pool.cc +++ b/tests/libmemcached-1.0/pool.cc @@ -55,6 +55,8 @@ using namespace libtest; #include #include +#include "libmemcached/instance.h" + #ifndef __INTEL_COMPILER #pragma GCC diagnostic ignored "-Wstrict-aliasing" #endif @@ -62,20 +64,19 @@ using namespace libtest; test_return_t memcached_pool_test(memcached_st *) { - 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); + test_compare(libmemcached_check_configuration(config_string, sizeof(config_string) -1, buffer, sizeof(buffer)), MEMCACHED_PARSE_ERROR); memcached_pool_st* pool= memcached_pool(config_string, strlen(config_string)); - test_true_got(pool, strerror(errno)); + test_true(pool); + memcached_return_t rc; memcached_st *memc= memcached_pool_pop(pool, false, &rc); - test_true(rc == MEMCACHED_SUCCESS); + test_compare(rc, MEMCACHED_SUCCESS); test_true(memc); /* @@ -493,6 +494,8 @@ test_return_t regression_bug_962815(memcached_st *memc) { Error << "poll() failed with:" << strerror(errno); } + test_zero(active_fd); + set_running(false); }