Skip to content

Commit

Permalink
Mitigate test flakiness
Browse files Browse the repository at this point in the history
Signed-off-by: methylDragon <[email protected]>
  • Loading branch information
methylDragon committed Dec 30, 2024
1 parent 5a40222 commit 0c4d4d5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -149,14 +149,14 @@ TEST_F(MoveGroupFixture, AlwaysInsertNeverPrunePolicyWorks)
ASSERT_TRUE(move_group_->setPoseTarget(move_group_->getRandomPose()));
move_group_->constructMotionPlanRequest(msg);
ret = move_group_->plan(plan);
} while (!ret && plan.trajectory.joint_trajectory.points.empty()); // Sometimes the plan fails with the random pose.
} while (!ret || plan.trajectory.joint_trajectory.points.empty()); // Sometimes the plan fails with the random pose.

do
{
ASSERT_TRUE(move_group_->setPoseTarget(move_group_->getRandomPose()));
move_group_->constructMotionPlanRequest(another_msg);
another_ret = move_group_->plan(another_plan);
} while (another_msg == msg && !another_ret &&
} while (another_msg == msg || !another_ret ||
another_plan.trajectory.joint_trajectory.points
.empty()); // Also, sometimes the random pose happens to be the same.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,14 +149,14 @@ TEST_F(MoveGroupFixture, BestSeenExecutionTimePolicyWorks)
ASSERT_TRUE(move_group_->setPoseTarget(move_group_->getRandomPose()));
move_group_->constructMotionPlanRequest(msg);
ret = move_group_->plan(plan);
} while (!ret && plan.trajectory.joint_trajectory.points.empty()); // Sometimes the plan fails with the random pose.
} while (!ret || plan.trajectory.joint_trajectory.points.empty()); // Sometimes the plan fails with the random pose.

do
{
ASSERT_TRUE(move_group_->setPoseTarget(move_group_->getRandomPose()));
move_group_->constructMotionPlanRequest(another_msg);
another_ret = move_group_->plan(another_plan);
} while (another_msg == msg && !another_ret &&
} while (another_msg == msg || !another_ret ||
another_plan.trajectory.joint_trajectory.points
.empty()); // Also, sometimes the random pose happens to be the same.

Expand Down

0 comments on commit 0c4d4d5

Please sign in to comment.