Skip to content

Commit e2460ae

Browse files
facontidavideclaude
andcommitted
Fix flaky Parallel.PauseWithRetry test on CI
The per-platform timing margins (10ms Linux, 40ms Windows) were too tight for loaded CI runners. Windows CI showed Sleep(150ms) overshooting by 47ms, exceeding the 40ms margin. Use a single 80ms margin that accommodates CI load while still validating behavioral correctness. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent b947663 commit e2460ae

1 file changed

Lines changed: 2 additions & 5 deletions

File tree

tests/gtest_parallel.cpp

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -583,11 +583,8 @@ TEST(Parallel, PauseWithRetry)
583583
ASSERT_EQ(NodeStatus::SUCCESS, status);
584584

585585
// tolerate an error in time measurement within this margin
586-
#ifdef WIN32
587-
const int margin_msec = 40;
588-
#else
589-
const int margin_msec = 10;
590-
#endif
586+
// CI runners (especially Windows) can overshoot Sleep by 50ms+ under load
587+
const int margin_msec = 80;
591588

592589
// the second branch with the RetryUntilSuccessful should take about 150 ms
593590
ASSERT_LE(toMsec(done_time - t1) - 150, margin_msec);

0 commit comments

Comments
 (0)