Skip to content

Commit

Permalink
more reliable unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
qchateau committed Mar 29, 2020
1 parent dd9e28f commit e178c29
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions test_package/basic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -258,12 +258,11 @@ TYPED_TEST(Test, test_timeout)
const auto assert_blocks = [](auto& future) {
ASSERT_EQ(
std::future_status::timeout,
future.wait_for(std::chrono::milliseconds{1}));
future.wait_for(std::chrono::milliseconds{100}));
};
const auto assert_cancelled = [](auto& future) {
ASSERT_EQ(
std::future_status::ready,
future.wait_for(std::chrono::milliseconds{1}));
std::future_status::ready, future.wait_for(std::chrono::seconds{1}));
try {
future.get();
ASSERT_FALSE(true); // never reached
Expand Down

0 comments on commit e178c29

Please sign in to comment.