4 #define BOOST_TEST_DYN_LINK
5 #define BOOST_TEST_MODULE RebotConnectionTimeoutTest
7 #include <boost/test/unit_test.hpp>
8 using namespace boost::unit_test_framework;
12 #include <condition_variable>
22 : rebotServer{0 ,
"./mtcadummy_rebot.map", 1 },
23 serverThread([&]() { rebotServer.start(); }) {
24 while(not rebotServer.is_running()) {
25 std::this_thread::sleep_for(std::chrono::milliseconds(1));
40 uint32_t timeout_sec = 1;
41 auto accetable_completion_time = std::chrono::seconds(timeout_sec * 5);
43 "&map=mtcadummy_rebot.map&timeout=" +
std::to_string(timeout_sec) +
")");
53 auto execution_duration = end - begin;
54 BOOST_CHECK(execution_duration < accetable_completion_time);
58 uint32_t timeout_sec = 1;
59 auto accetable_completion_time = std::chrono::seconds(timeout_sec * 5);
61 "&map=mtcadummy_rebot.map&timeout=" +
std::to_string(timeout_sec) +
")");
76 auto execution_duration = end - begin;
77 BOOST_CHECK(execution_duration < accetable_completion_time);
81 uint32_t timeout_sec = 1;
82 auto accetable_completion_time = std::chrono::seconds(timeout_sec * 5);
84 "&map=mtcadummy_rebot.map&timeout=" +
std::to_string(timeout_sec) +
")");
97 auto execution_duration = end - begin;
98 BOOST_CHECK(execution_duration < accetable_completion_time);