Skip to content

Commit

Permalink
fix(TestExecutors): Fixed race in testcase
Browse files Browse the repository at this point in the history
Signed-off-by: Janosch Machowinski <[email protected]>
  • Loading branch information
Janosch Machowinski committed Dec 18, 2024
1 parent f0285e6 commit 83b01e2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions rclcpp/test/rclcpp/executors/test_executors.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -749,8 +749,8 @@ TYPED_TEST(TestExecutors, notifyTwiceWhileSpinning)
this->publisher->publish(test_msgs::msg::Empty());
start = std::chrono::steady_clock::now();
while (
sub1_msg_count == 1 &&
sub2_msg_count == 0 &&
(sub1_msg_count != 2 ||
sub2_msg_count != 1) &&
(std::chrono::steady_clock::now() - start) < 10s)
{
std::this_thread::sleep_for(1ms);
Expand Down

0 comments on commit 83b01e2

Please sign in to comment.