Skip to content

Commit 520d266

Browse files
mergify[bot]XINJIANGMOahcorde
authored
Fix flaky test in DepthCameraSensorTest::ImagesWithBuiltinSDF (#536) (#538)
(cherry picked from commit d045b32) Signed-off-by: momo <2438833481@qq.com> Signed-off-by: Oscmoar07 <108773152+XINJIANGMO@users.noreply.github.com> Signed-off-by: Alejandro Hernández Cordero <ahcorde@gmail.com> Co-authored-by: Oscmoar07 <108773152+XINJIANGMO@users.noreply.github.com> Co-authored-by: Alejandro Hernández Cordero <ahcorde@gmail.com>
1 parent 38308f0 commit 520d266

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

test/integration/depth_camera.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -449,7 +449,8 @@ void DepthCameraSensorTest::ImagesWithBuiltinSDF(
449449
EXPECT_GT(counter, 0);
450450
EXPECT_GT(pcCounter, 0);
451451
EXPECT_EQ(counter, infoCounter);
452-
EXPECT_EQ(counter, pcCounter);
452+
// Allow counter diff of 1 due to async timing and race conditions
453+
EXPECT_LE(std::abs(counter - pcCounter), 1);
453454
counter = 0;
454455
infoCounter = 0;
455456
pcCounter = 0;

0 commit comments

Comments
 (0)