Skip to content

Commit

Permalink
Fix test race.
Browse files Browse the repository at this point in the history
  • Loading branch information
evoskuil committed May 6, 2024
1 parent b3c880a commit 3ca76f9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions test/net/acceptor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,8 @@ BOOST_AUTO_TEST_CASE(acceptor__start__stop__success)
BOOST_REQUIRE(instance->get_stopped());
}

BOOST_AUTO_TEST_CASE(acceptor__accept__stop_suspended__service_suspended)
// race
BOOST_AUTO_TEST_CASE(acceptor__accept__stop_suspended__service_stopped_or_suspended)
{
// TODO: There is no way to fake successful acceptance.
const logger log{};
Expand Down Expand Up @@ -122,7 +123,7 @@ BOOST_AUTO_TEST_CASE(acceptor__accept__stop_suspended__service_suspended)
pool.stop();
BOOST_REQUIRE(pool.join());
BOOST_REQUIRE(instance->get_stopped());
BOOST_REQUIRE_EQUAL(result.first, error::service_suspended);
BOOST_REQUIRE(result.first == error::service_suspended || result.first == error::service_stopped);
BOOST_REQUIRE(!result.second);
}

Expand Down

0 comments on commit 3ca76f9

Please sign in to comment.