[notification] sloppier tests (#31422)

pull/31439/head
Craig Tiller 2 years ago committed by GitHub
parent 2158ce7523
commit a4a4e54bb1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      test/core/gprpp/notification_test.cc

@ -35,7 +35,7 @@ TEST(Notification, Waits) {
Notification n;
auto start = absl::Now();
std::thread t([&n] {
absl::SleepFor(absl::Seconds(5));
absl::SleepFor(absl::Seconds(6));
n.Notify();
});
n.WaitForNotification();
@ -48,7 +48,7 @@ TEST(Notification, WaitsWithTimeout) {
Notification n;
auto start = absl::Now();
std::thread t([&n] {
absl::SleepFor(absl::Seconds(5));
absl::SleepFor(absl::Seconds(6));
n.Notify();
});
EXPECT_TRUE(n.WaitForNotificationWithTimeout(absl::Seconds(10)));
@ -62,7 +62,7 @@ TEST(Notification, WaitWithTimeoutCanFinishEarly) {
Notification n;
auto start = absl::Now();
std::thread t([&n] {
absl::SleepFor(absl::Seconds(5));
absl::SleepFor(absl::Seconds(6));
n.Notify();
});
EXPECT_FALSE(n.WaitForNotificationWithTimeout(absl::Seconds(1)));

Loading…
Cancel
Save