Commit 53e6dae0 by Evan Brown Committed by Copybara-Service

Fix flaky MSVC test failures by using longer slop time.

PiperOrigin-RevId: 613326708
Change-Id: I6e5ca195f208b8da0d21d70b5a035bfdc64f866d
parent 6f0bb274
......@@ -159,7 +159,11 @@ TEST_F(PerThreadSemTest, Timeouts) {
const absl::Duration elapsed = absl::Now() - start;
// Allow for a slight early return, to account for quality of implementation
// issues on various platforms.
const absl::Duration slop = absl::Milliseconds(1);
absl::Duration slop = absl::Milliseconds(1);
#ifdef _MSC_VER
// Use higher slop on MSVC due to flaky test failures.
slop = absl::Milliseconds(4);
#endif
EXPECT_LE(delay - slop, elapsed)
<< "Wait returned " << delay - elapsed
<< " early (with " << slop << " slop), start time was " << start;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment