summaryrefslogtreecommitdiff
path: root/absl/synchronization/internal
diff options
context:
space:
mode:
authorGravatar Evan Brown <ezb@google.com>2023-03-27 23:45:25 -0700
committerGravatar Copybara-Service <copybara-worker@google.com>2023-03-27 23:46:38 -0700
commited7c1ee121668acab2d753ecc84ac036bbb8b43f (patch)
treeb037333e1dae3b366f637b957f8ec025b2ca65cd /absl/synchronization/internal
parent6b4af2497bf3ec56b070fdd6d8c2cf5996c17dbe (diff)
Fix flakiness issues in timing tests.
PiperOrigin-RevId: 519939158 Change-Id: I9b049fa55167ed4064f3909887eec7bc52601677
Diffstat (limited to 'absl/synchronization/internal')
-rw-r--r--absl/synchronization/internal/waiter_test.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/absl/synchronization/internal/waiter_test.cc b/absl/synchronization/internal/waiter_test.cc
index 5de11d26..66b255de 100644
--- a/absl/synchronization/internal/waiter_test.cc
+++ b/absl/synchronization/internal/waiter_test.cc
@@ -48,7 +48,7 @@ class WaiterTest : public ::testing::Test {
TYPED_TEST_SUITE_P(WaiterTest);
-constexpr absl::Duration slop = absl::Milliseconds(2);
+constexpr absl::Duration slop = absl::Milliseconds(10);
TYPED_TEST_P(WaiterTest, WaitNoTimeout) {
absl::synchronization_internal::ThreadPool tp(1);
@@ -84,7 +84,7 @@ TYPED_TEST_P(WaiterTest, WaitDurationWoken) {
absl::synchronization_internal::KernelTimeout(absl::Seconds(10))));
absl::Duration waited = absl::Now() - start;
EXPECT_GE(waited, absl::Milliseconds(500) - slop);
- EXPECT_LT(waited, absl::Seconds(1));
+ EXPECT_LT(waited, absl::Seconds(2));
}
TYPED_TEST_P(WaiterTest, WaitTimeWoken) {
@@ -102,7 +102,7 @@ TYPED_TEST_P(WaiterTest, WaitTimeWoken) {
start + absl::Seconds(10))));
absl::Duration waited = absl::Now() - start;
EXPECT_GE(waited, absl::Milliseconds(500) - slop);
- EXPECT_LT(waited, absl::Seconds(1));
+ EXPECT_LT(waited, absl::Seconds(2));
}
TYPED_TEST_P(WaiterTest, WaitDurationReached) {