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]); } }