1 #include "test/lib/common.hpp"
2 #include "test/lib/random.hpp"
3 #include "test/lib/Server.hpp"
4 #include "test/lib/ReturnMatcher.hpp"
6 TEST_CASE("memcached_regression_lp1540680") {
7 Server timeout
{TESTING_ROOT
"/timeout", {"-p", random_port_string
}};
9 LoneReturnMatcher test
{*memc
};
11 REQUIRE(timeout
.start());
12 this_thread::sleep_for(500ms
);
14 REQUIRE_SUCCESS(memcached_server_add(*memc
, "localhost", get
<int>(timeout
.getSocketOrPort())));
16 memcached_return_t rc
;
17 Malloced
val(memcached_get(*memc
, S("not-found"), nullptr, nullptr, &rc
));
18 REQUIRE_RC(MEMCACHED_TIMEOUT
, rc
);