summaryrefslogtreecommitdiff
path: root/absl
diff options
context:
space:
mode:
Diffstat (limited to 'absl')
-rw-r--r--absl/synchronization/internal/waiter_test.cc6
-rw-r--r--absl/synchronization/notification_test.cc2
2 files changed, 4 insertions, 4 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) {
diff --git a/absl/synchronization/notification_test.cc b/absl/synchronization/notification_test.cc
index 100ea76f..49ce61a5 100644
--- a/absl/synchronization/notification_test.cc
+++ b/absl/synchronization/notification_test.cc
@@ -79,7 +79,7 @@ static void BasicTests(bool notify_before_waiting, Notification* notification) {
// Allow for a slight early return, to account for quality of implementation
// issues on various platforms.
- const absl::Duration slop = absl::Microseconds(200);
+ const absl::Duration slop = absl::Milliseconds(5);
EXPECT_LE(delay - slop, elapsed)
<< "WaitForNotificationWithTimeout returned " << delay - elapsed
<< " early (with " << slop << " slop), start time was " << start;