Skip to content

Commit 0c4d4d5

Browse files
committed
Mitigate test flakiness
Signed-off-by: methylDragon <[email protected]>
1 parent 5a40222 commit 0c4d4d5

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

moveit_ros/trajectory_cache/test/cache_insert_policies/test_always_insert_never_prune_policy_with_move_group.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,14 +149,14 @@ TEST_F(MoveGroupFixture, AlwaysInsertNeverPrunePolicyWorks)
149149
ASSERT_TRUE(move_group_->setPoseTarget(move_group_->getRandomPose()));
150150
move_group_->constructMotionPlanRequest(msg);
151151
ret = move_group_->plan(plan);
152-
} while (!ret && plan.trajectory.joint_trajectory.points.empty()); // Sometimes the plan fails with the random pose.
152+
} while (!ret || plan.trajectory.joint_trajectory.points.empty()); // Sometimes the plan fails with the random pose.
153153

154154
do
155155
{
156156
ASSERT_TRUE(move_group_->setPoseTarget(move_group_->getRandomPose()));
157157
move_group_->constructMotionPlanRequest(another_msg);
158158
another_ret = move_group_->plan(another_plan);
159-
} while (another_msg == msg && !another_ret &&
159+
} while (another_msg == msg || !another_ret ||
160160
another_plan.trajectory.joint_trajectory.points
161161
.empty()); // Also, sometimes the random pose happens to be the same.
162162

moveit_ros/trajectory_cache/test/cache_insert_policies/test_best_seen_execution_time_policy_with_move_group.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,14 +149,14 @@ TEST_F(MoveGroupFixture, BestSeenExecutionTimePolicyWorks)
149149
ASSERT_TRUE(move_group_->setPoseTarget(move_group_->getRandomPose()));
150150
move_group_->constructMotionPlanRequest(msg);
151151
ret = move_group_->plan(plan);
152-
} while (!ret && plan.trajectory.joint_trajectory.points.empty()); // Sometimes the plan fails with the random pose.
152+
} while (!ret || plan.trajectory.joint_trajectory.points.empty()); // Sometimes the plan fails with the random pose.
153153

154154
do
155155
{
156156
ASSERT_TRUE(move_group_->setPoseTarget(move_group_->getRandomPose()));
157157
move_group_->constructMotionPlanRequest(another_msg);
158158
another_ret = move_group_->plan(another_plan);
159-
} while (another_msg == msg && !another_ret &&
159+
} while (another_msg == msg || !another_ret ||
160160
another_plan.trajectory.joint_trajectory.points
161161
.empty()); // Also, sometimes the random pose happens to be the same.
162162

0 commit comments

Comments
 (0)