Skip to content

Commit

Permalink
Add fiber yield in test before ParallelTester::wait_for
Browse files Browse the repository at this point in the history
Signed-off-by: Will Killian <[email protected]>
  • Loading branch information
willkill07 committed Dec 3, 2024
1 parent 69ed67c commit 3565138
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cpp/mrc/tests/test_node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
#include "mrc/segment/object.hpp"
#include "mrc/utils/string_utils.hpp"

#include <boost/fiber/operations.hpp>
#include <glog/logging.h>
#include <gtest/gtest.h>
#include <rxcpp/rx.hpp>
Expand Down Expand Up @@ -743,7 +744,7 @@ TEST_P(ParallelTests, NodeMultiThread)
}

DVLOG(1) << context.info() << " Node got value: '" << x << "'" << std::endl;

boost::this_fiber::yield();
EXPECT_TRUE(parallel_test.wait_for(250ms));
// Double the value
return x * 2;
Expand Down

0 comments on commit 3565138

Please sign in to comment.