Skip to content

Commit

Permalink
Unbreak broadcast_wait_for_2822 test
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas Heller committed Jan 12, 2018
1 parent 2bff68d commit 3d259be
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions tests/regressions/lcos/broadcast_wait_for_2822.cpp
Expand Up @@ -39,8 +39,17 @@ int hpx_main()

auto f =
hpx::lcos::broadcast<vector_bcast_action>(localities, bcast_array);
HPX_TEST(f.wait_for(std::chrono::milliseconds(1000)) ==
hpx::lcos::future_status::ready);
hpx::lcos::future_status status = hpx::lcos::future_status::timeout;

// This test should usually test against future_status == ready. However,
// under some circumstances, the operation might still take a little
// longer...
while (status != hpx::lcos::future_status::ready)
{
status = f.wait_for(std::chrono::milliseconds(1000));
HPX_TEST( status ==
hpx::lcos::future_status::ready || status == hpx::lcos::future_status::timeout);
}

HPX_TEST_EQ(buffer.size(), N);
HPX_TEST_EQ(buffer.size(), bcast_array.size());
Expand Down

0 comments on commit 3d259be

Please sign in to comment.