diff options
author | 2017-10-06 18:10:05 -0700 | |
---|---|---|
committer | 2017-10-06 18:10:05 -0700 | |
commit | cd58b2dceac4e9caaf299fa9409d6f82e40d8428 (patch) | |
tree | 8399e16f57f18f97a761e261176b5a500c92ce14 /test/core/iomgr/tcp_client_uv_test.c | |
parent | d6712390a6b24732fb1feeced6ad68e9ac54ea5c (diff) |
uv changes for grpc_pollset_work
Diffstat (limited to 'test/core/iomgr/tcp_client_uv_test.c')
-rw-r--r-- | test/core/iomgr/tcp_client_uv_test.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/test/core/iomgr/tcp_client_uv_test.c b/test/core/iomgr/tcp_client_uv_test.c index 53061100a2..f94e589b8d 100644 --- a/test/core/iomgr/tcp_client_uv_test.c +++ b/test/core/iomgr/tcp_client_uv_test.c @@ -42,8 +42,8 @@ static grpc_pollset *g_pollset; static int g_connections_complete = 0; static grpc_endpoint *g_connecting = NULL; -static gpr_timespec test_deadline(void) { - return grpc_timeout_seconds_to_deadline(10); +static grpc_millis test_deadline(void) { + return grpc_timespec_to_millis_round_up(grpc_timeout_seconds_to_deadline(10)); } static void finish_connection(grpc_exec_ctx *exec_ctx) { @@ -119,7 +119,6 @@ void test_succeeds(void) { GPR_ASSERT(GRPC_LOG_IF_ERROR( "pollset_work", grpc_pollset_work(&exec_ctx, g_pollset, &worker, - gpr_now(GPR_CLOCK_MONOTONIC), grpc_timeout_seconds_to_deadline(5)))); gpr_mu_unlock(g_mu); grpc_exec_ctx_flush(&exec_ctx); @@ -162,17 +161,17 @@ void test_fails(void) { while (g_connections_complete == connections_complete_before) { grpc_pollset_worker *worker = NULL; gpr_timespec now = gpr_now(GPR_CLOCK_MONOTONIC); - gpr_timespec polling_deadline = test_deadline(); + grpc_millis polling_deadline = test_deadline(); switch (grpc_timer_check(&exec_ctx, now, &polling_deadline)) { case GRPC_TIMERS_FIRED: break; case GRPC_TIMERS_NOT_CHECKED: - polling_deadline = now; + polling_deadline = grpc_timespec_to_millis_round_up(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))); + polling_deadline))); break; } gpr_mu_unlock(g_mu); |