From b69a7cc65d51bfd60ff7a61f8242026983983345 Mon Sep 17 00:00:00 2001 From: Ian Chen Date: Fri, 6 Oct 2023 19:59:13 +0000 Subject: [PATCH] Relax pose check in actor no mesh test Signed-off-by: Ian Chen --- test/integration/actor_trajectory.cc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/test/integration/actor_trajectory.cc b/test/integration/actor_trajectory.cc index 8116499686..7a6819ba28 100644 --- a/test/integration/actor_trajectory.cc +++ b/test/integration/actor_trajectory.cc @@ -156,9 +156,12 @@ TEST_F(ActorFixture, GZ_UTILS_TEST_DISABLED_ON_MAC(ActorTrajectoryNoMesh)) std::lock_guard lock(g_mutex); auto it = g_modelPoses.find(boxName); auto &poses = it->second; - for (unsigned int i = 0; i < poses.size()-1; ++i) + for (unsigned int i = 0; i < poses.size()-2; i+=2) { - EXPECT_NE(poses[i], poses[i+1]); + // There could be times when the rendering thread has not updated + // between PostUpdates so two consecutive poses may still be the same. + // So check for diff between every other pose + EXPECT_NE(poses[i], poses[i+2]); } }