diff --git a/src/peer.cpp b/src/peer.cpp index 01510383d2f42beb684abc9dd359e23ed4e05cd4..d122eff21cec67b478bcb705d626e2c44c147b83 100644 --- a/src/peer.cpp +++ b/src/peer.cpp @@ -538,7 +538,6 @@ bool Peer::waitConnection(int s) { }); cv.wait_for(lk, seconds(s), [this]() { return status_ == NodeStatus::kConnected;}); - if (status_ != NodeStatus::kConnected) LOG(ERROR) << "NOT CONNECTED: " << int(status_); return status_ == NodeStatus::kConnected; } diff --git a/test/net_integration.cpp b/test/net_integration.cpp index 217ba2874686bd19f0bd992f536380e418ef98d3..c83f8cbd932a5a303ab1711d26e36706a6b773d7 100644 --- a/test/net_integration.cpp +++ b/test/net_integration.cpp @@ -48,7 +48,7 @@ TEST_CASE("Listen and Connect", "[net]") { REQUIRE( p->waitConnection(5) ); - REQUIRE( self->numberOfNodes() == 1 ); + REQUIRE( self->waitConnections() == 1 ); REQUIRE( ftl::getSelf()->numberOfNodes() == 1); } @@ -81,7 +81,6 @@ TEST_CASE("Listen and Connect", "[net]") { // remote closes on first connection disconnected_once = true; p_listening->close(true); - LOG(INFO) << "disconnected"; } else { // notify on second cv.notify_one(); @@ -90,7 +89,7 @@ TEST_CASE("Listen and Connect", "[net]") { }); REQUIRE(cv.wait_for(lk, std::chrono::seconds(5)) == std::cv_status::no_timeout); - REQUIRE(p_connecting->isConnected()); + REQUIRE(p_connecting->waitConnection(5)); } SECTION("automatic reconnect from originating connection") {