diff options
author | Craig Tiller <ctiller@google.com> | 2017-06-08 21:09:59 +0000 |
---|---|---|
committer | Craig Tiller <ctiller@google.com> | 2017-06-08 21:09:59 +0000 |
commit | 8239b804598c114be892e0c4ee96041d9781521f (patch) | |
tree | 380a3284d8ba9b8d918c549e1f40f84377409d9b /test/core/bad_client | |
parent | 12f149ff2fa6218470b4a382617d7d152f607144 (diff) |
Ensure a poller exists
Diffstat (limited to 'test/core/bad_client')
-rw-r--r-- | test/core/bad_client/bad_client.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/test/core/bad_client/bad_client.c b/test/core/bad_client/bad_client.c index cfe1ce51f8..1b63bd93cc 100644 --- a/test/core/bad_client/bad_client.c +++ b/test/core/bad_client/bad_client.c @@ -169,8 +169,11 @@ void grpc_run_bad_client_test( grpc_endpoint_read(&exec_ctx, sfd.client, &args.incoming, &read_done_closure); grpc_exec_ctx_finish(&exec_ctx); - GPR_ASSERT( - gpr_event_wait(&args.read_done, grpc_timeout_seconds_to_deadline(5))); + gpr_timespec deadline = grpc_timeout_seconds_to_deadline(5); + while (!gpr_event_get(&args.read_done)) { + GPR_ASSERT(gpr_time_cmp(deadline, gpr_now(deadline.clock_type)) > 0); + GPR_ASSERT(grpc_completion_queue_next(a.cq, grpc_timeout_milliseconds_to_deadline(100), NULL).type == GRPC_QUEUE_TIMEOUT); + } grpc_slice_buffer_destroy_internal(&exec_ctx, &args.incoming); } // Shutdown. |