@@ -56,14 +56,14 @@ BOOST_AUTO_TEST_CASE(connection_refused)
5656 std::promise<void > p;
5757 TestThread timeoutThread{[&]() {
5858 auto f = p.get_future ();
59- GetConnection ().CancelAfterTimeout (f, 50ms );
59+ GetConnection ().CancelAfterTimeout (f, 250ms );
6060 }};
6161
6262 BOOST_REQUIRE_THROW (
6363 GetConnection ().Send (boost::asio::const_buffer{" foobar" , 7 }), PerfdataWriterConnection::Stopped
6464 );
6565
66- REQUIRE_JOINS_WITHIN (timeoutThread, 1s );
66+ REQUIRE_JOINS_WITHIN (timeoutThread, 10s );
6767}
6868
6969/* The PerfdataWriterConnection connects automatically when sending the first data.
@@ -86,7 +86,7 @@ BOOST_AUTO_TEST_CASE(ensure_connected)
8686 BOOST_REQUIRE_NO_THROW (GetConnection ().Disconnect ());
8787 disconnectedPromise.set_value ();
8888
89- REQUIRE_JOINS_WITHIN (mockTargetThread, 1s );
89+ REQUIRE_JOINS_WITHIN (mockTargetThread, 10s );
9090}
9191
9292/* Verify that data can still be sent while CancelAfterTimeout is waiting and the timeout
@@ -113,15 +113,15 @@ BOOST_AUTO_TEST_CASE(finish_during_timeout)
113113
114114 TestThread timeoutThread{[&]() {
115115 auto f = p.get_future ();
116- GetConnection ().CancelAfterTimeout (f, 50ms );
116+ GetConnection ().CancelAfterTimeout (f, 250ms );
117117 BOOST_REQUIRE (f.wait_for (0ms) == std::future_status::ready);
118118 BOOST_REQUIRE (!GetConnection ().IsConnected ());
119119 }};
120120
121121 GetConnection ().Send (boost::asio::const_buffer{" foobar" , 7 });
122122
123- REQUIRE_JOINS_WITHIN (timeoutThread, 1s );
124- REQUIRE_JOINS_WITHIN (mockTargetThread, 1s );
123+ REQUIRE_JOINS_WITHIN (timeoutThread, 10s );
124+ REQUIRE_JOINS_WITHIN (mockTargetThread, 10s );
125125}
126126
127127/* For the client, even a hanging server will accept the connection immediately, since it's done
@@ -134,15 +134,15 @@ BOOST_AUTO_TEST_CASE(stuck_in_handshake)
134134 TestThread timeoutThread{[&]() {
135135 Accept ();
136136 auto f = p.get_future ();
137- GetConnection ().CancelAfterTimeout (f, 50ms );
137+ GetConnection ().CancelAfterTimeout (f, 250ms );
138138 BOOST_REQUIRE (f.wait_for (0ms) == std::future_status::timeout);
139139 }};
140140
141141 BOOST_REQUIRE_THROW (
142142 GetConnection ().Send (boost::asio::const_buffer{" foobar" , 7 }), PerfdataWriterConnection::Stopped
143143 );
144144
145- REQUIRE_JOINS_WITHIN (timeoutThread, 1s );
145+ REQUIRE_JOINS_WITHIN (timeoutThread, 10s );
146146}
147147
148148/* When the disconnect timeout runs out while sending something to a slow or blocking server, we
@@ -185,8 +185,8 @@ BOOST_AUTO_TEST_CASE(stuck_sending)
185185 BOOST_REQUIRE_THROW (GetConnection ().Send (buf), PerfdataWriterConnection::Stopped);
186186 shutdownPromise.set_value ();
187187
188- REQUIRE_JOINS_WITHIN (timeoutThread, 1s );
189- REQUIRE_JOINS_WITHIN (mockTargetThread, 1s );
188+ REQUIRE_JOINS_WITHIN (timeoutThread, 10s );
189+ REQUIRE_JOINS_WITHIN (mockTargetThread, 10s );
190190}
191191
192192/* This simulates a server that is stuck after receiving a HTTP request and before sending their
@@ -226,8 +226,8 @@ BOOST_AUTO_TEST_CASE(stuck_reading_response)
226226 BOOST_REQUIRE_THROW (GetConnection ().Send (request), PerfdataWriterConnection::Stopped);
227227 shutdownPromise.set_value ();
228228
229- REQUIRE_JOINS_WITHIN (timeoutThread, 1s );
230- REQUIRE_JOINS_WITHIN (mockTargetThread, 1s );
229+ REQUIRE_JOINS_WITHIN (timeoutThread, 10s );
230+ REQUIRE_JOINS_WITHIN (mockTargetThread, 10s );
231231}
232232
233233/* This test simulates a server that closes the connection and reappears at a later time.
@@ -261,7 +261,7 @@ BOOST_AUTO_TEST_CASE(reconnect_failed)
261261 BOOST_REQUIRE_NO_THROW (GetConnection ().Send (boost::asio::const_buffer{randomData.data (), randomData.size ()}));
262262 BOOST_REQUIRE_NO_THROW (GetConnection ().Disconnect ());
263263
264- REQUIRE_JOINS_WITHIN (mockTargetThread, 1s );
264+ REQUIRE_JOINS_WITHIN (mockTargetThread, 10s );
265265}
266266
267267/* This tests if retrying an http send will reproducibly lead to the exact same message being
@@ -329,7 +329,7 @@ BOOST_AUTO_TEST_CASE(http_send_retry)
329329 BOOST_REQUIRE_NO_THROW (GetConnection ().Send (request));
330330 BOOST_REQUIRE_NO_THROW (GetConnection ().Disconnect ());
331331
332- REQUIRE_JOINS_WITHIN (mockTargetThread, 1s );
332+ REQUIRE_JOINS_WITHIN (mockTargetThread, 10s );
333333}
334334
335335BOOST_AUTO_TEST_SUITE_END ()
0 commit comments