Skip to content

Commit fa83c2f

Browse files
fixes the exit-code error on osx builds.
1 parent 9925e82 commit fa83c2f

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

test/v1/exit_code.cpp

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -148,12 +148,17 @@ BOOST_AUTO_TEST_CASE(async_nowait, *boost::unit_test::timeout(10))
148148
boost::asio::io_context io_context;
149149
bp::child c(
150150
master_test_suite().argv[1],
151-
"test", "--exit-code", "221",
151+
"test", "--exit-code", "121",
152152
ec,
153153
bp::on_exit=[](int exit_code, std::error_code) mutable {},
154154
io_context
155155
);
156156
BOOST_REQUIRE(!ec);
157-
io_context.run_for(std::chrono::milliseconds(100));
158-
BOOST_CHECK_EQUAL(221, c.exit_code());
157+
while (c.running())
158+
{
159+
io_context.run_for(std::chrono::milliseconds(10));
160+
io_context.restart();
161+
}
162+
163+
BOOST_CHECK_EQUAL(121, c.exit_code());
159164
}

0 commit comments

Comments
 (0)