Make alarm_test tolerant of threading

pull/11866/head^2
Craig Tiller 7 years ago
parent 8070e361bd
commit 1a8f1e831d
  1. 4
      test/cpp/common/alarm_cpp_test.cc

@ -142,7 +142,7 @@ TEST(AlarmTest, ZeroExpiry) {
void* output_tag;
bool ok;
const CompletionQueue::NextStatus status = cq.AsyncNext(
(void**)&output_tag, &ok, grpc_timeout_seconds_to_deadline(0));
(void**)&output_tag, &ok, grpc_timeout_seconds_to_deadline(1));
EXPECT_EQ(status, CompletionQueue::GOT_EVENT);
EXPECT_TRUE(ok);
@ -158,7 +158,7 @@ TEST(AlarmTest, NegativeExpiry) {
void* output_tag;
bool ok;
const CompletionQueue::NextStatus status = cq.AsyncNext(
(void**)&output_tag, &ok, grpc_timeout_seconds_to_deadline(0));
(void**)&output_tag, &ok, grpc_timeout_seconds_to_deadline(1));
EXPECT_EQ(status, CompletionQueue::GOT_EVENT);
EXPECT_TRUE(ok);

Loading…
Cancel
Save