aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/core/iomgr/tcp_client_uv_test.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/core/iomgr/tcp_client_uv_test.c')
-rw-r--r--test/core/iomgr/tcp_client_uv_test.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/test/core/iomgr/tcp_client_uv_test.c b/test/core/iomgr/tcp_client_uv_test.c
index 3a8458df86..4ec05cff12 100644
--- a/test/core/iomgr/tcp_client_uv_test.c
+++ b/test/core/iomgr/tcp_client_uv_test.c
@@ -178,10 +178,17 @@ void test_fails(void) {
grpc_pollset_worker *worker = NULL;
gpr_timespec now = gpr_now(GPR_CLOCK_MONOTONIC);
gpr_timespec polling_deadline = test_deadline();
- if (!grpc_timer_check(&exec_ctx, now, &polling_deadline)) {
- GPR_ASSERT(GRPC_LOG_IF_ERROR(
- "pollset_work", grpc_pollset_work(&exec_ctx, g_pollset, &worker, now,
- polling_deadline)));
+ switch (grpc_timer_check(&exec_ctx, now, &polling_deadline)) {
+ case GRPC_TIMERS_FIRED:
+ break;
+ case GRPC_TIMERS_NOT_CHECKED:
+ polling_deadline = now;
+ /* fall through */
+ case GRPC_TIMERS_CHECKED_AND_EMPTY:
+ GPR_ASSERT(GRPC_LOG_IF_ERROR(
+ "pollset_work", grpc_pollset_work(&exec_ctx, g_pollset, &worker,
+ now, polling_deadline)));
+ break;
}
gpr_mu_unlock(g_mu);
grpc_exec_ctx_flush(&exec_ctx);