From 9d03c9016d610633c09cdf46379ff1868788909b Mon Sep 17 00:00:00 2001 From: sea-bass Date: Thu, 21 Nov 2024 22:38:02 -0500 Subject: [PATCH] Add sleep in setup of flaky PSM test fixture --- .../test/planning_scene_monitor_test.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/moveit_ros/planning/planning_scene_monitor/test/planning_scene_monitor_test.cpp b/moveit_ros/planning/planning_scene_monitor/test/planning_scene_monitor_test.cpp index 806a88f3ac..0547216437 100644 --- a/moveit_ros/planning/planning_scene_monitor/test/planning_scene_monitor_test.cpp +++ b/moveit_ros/planning/planning_scene_monitor/test/planning_scene_monitor_test.cpp @@ -59,6 +59,9 @@ class PlanningSceneMonitorTest : public ::testing::Test scene_ = planning_scene_monitor_->getPlanningScene(); executor_->add_node(test_node_); executor_thread_ = std::thread([this]() { executor_->spin(); }); + + // Needed to avoid race conditions on high-load CPUs. + std::this_thread::sleep_for(std::chrono::seconds{ 1 }); } void TearDown() override