if(BUILD_TESTING)
set(MEMCACHED_BINARY "/usr/bin/memcached"
CACHE FILEPATH "memcached binary")
- set(CMAKE_CTEST_ARGUMENTS "--output-on-failure;-j2;--repeat;until-pass:2"
- ) # available since CMake 3.17
+ set(CMAKE_CTEST_ARGUMENTS "--output-on-failure")
+ if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.17)
+ # available since CMake 3.17
+ list(APPEND CMAKE_CTEST_ARGUMENTS -j2 --repeat until-pass:2)
+ endif()
endif()
if(BUILD_DOCS)
Retry cluster_is_listening([this]() {
return cluster.isListening();
});
- REQUIRE(cluster_is_listening());
+ while (!cluster_is_listening()) {
+ cluster.stop();
+ cluster.wait();
+ cluster.start();
+ }
REQUIRE(memcached_create(&memc));
for (const auto &server : cluster.getServers()) {