From: Michael Wallner Date: Mon, 13 Jan 2020 15:29:08 +0000 (+0100) Subject: tests: fix flaky regression_bug_1251482 test X-Git-Tag: pre_cmake~45 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=c3472bb8e7417a272f8c76c5a1316e3370adc941;p=awesomized%2Flibmemcached tests: fix flaky regression_bug_1251482 test --- diff --git a/tests/libmemcached-1.0/mem_functions.cc b/tests/libmemcached-1.0/mem_functions.cc index 0d6d047d..0e380b7a 100644 --- a/tests/libmemcached-1.0/mem_functions.cc +++ b/tests/libmemcached-1.0/mem_functions.cc @@ -4848,7 +4848,7 @@ test_return_t regression_bug_1251482(memcached_st*) memcached_behavior_set(&memc, MEMCACHED_BEHAVIOR_RETRY_TIMEOUT, 0); - for (size_t x= 4; x; --x) + for (size_t x= 0; x < 5; ++x) { size_t value_length; memcached_return_t rc; @@ -4858,7 +4858,11 @@ test_return_t regression_bug_1251482(memcached_st*) test_false(value); test_compare(0LLU, value_length); - test_compare(MEMCACHED_CONNECTION_FAILURE, rc); + if (x) { + test_ne_compare(MEMCACHED_SUCCESS, rc); + } else { + test_compare(MEMCACHED_CONNECTION_FAILURE, rc); + } } return TEST_SUCCESS;