Skip to content
Snippets Groups Projects
Commit a301bc83 authored by Nicolas Pope's avatar Nicolas Pope
Browse files

Fix cv in net int test

parent 185326b2
No related branches found
No related tags found
No related merge requests found
...@@ -88,8 +88,11 @@ TEST_CASE("Listen and Connect", "[net]") { ...@@ -88,8 +88,11 @@ TEST_CASE("Listen and Connect", "[net]") {
return true; return true;
}); });
REQUIRE(cv.wait_for(lk, std::chrono::seconds(5)) == std::cv_status::no_timeout); bool res = cv.wait_for(lk, std::chrono::seconds(5), [p_connecting]() { return p_connecting->isConnected(); });
REQUIRE(p_connecting->waitConnection(5)); REQUIRE( res );
//REQUIRE(cv.wait_for(lk, std::chrono::seconds(5)) == std::cv_status::no_timeout);
//REQUIRE(p_connecting->waitConnection(5));
} }
SECTION("automatic reconnect from originating connection") { SECTION("automatic reconnect from originating connection") {
...@@ -118,8 +121,8 @@ TEST_CASE("Listen and Connect", "[net]") { ...@@ -118,8 +121,8 @@ TEST_CASE("Listen and Connect", "[net]") {
return true; return true;
}); });
REQUIRE(cv.wait_for(lk, std::chrono::seconds(5)) == std::cv_status::no_timeout); bool res = cv.wait_for(lk, std::chrono::seconds(5), [p_connecting]() { return p_connecting->isConnected(); });
REQUIRE(p_connecting->isConnected()); REQUIRE( res );
} }
ftl::protocol::reset(); ftl::protocol::reset();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment