diff options
Diffstat (limited to 'test/core/util/port_server_client.c')
-rw-r--r-- | test/core/util/port_server_client.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/test/core/util/port_server_client.c b/test/core/util/port_server_client.c index ba4028dbee..7b94ac4ada 100644 --- a/test/core/util/port_server_client.c +++ b/test/core/util/port_server_client.c @@ -88,7 +88,7 @@ void grpc_free_port_using_server(int port) { grpc_resource_quota *resource_quota = grpc_resource_quota_create("port_server_client/free"); grpc_httpcli_get(&exec_ctx, &context, &pr.pops, resource_quota, &req, - grpc_timeout_seconds_to_deadline(30), + grpc_exec_ctx_now(&exec_ctx) + 30 * GPR_MS_PER_SEC, GRPC_CLOSURE_CREATE(freed_port_from_server, &pr, grpc_schedule_on_exec_ctx), &rsp); @@ -100,8 +100,8 @@ void grpc_free_port_using_server(int port) { if (!GRPC_LOG_IF_ERROR( "pollset_work", grpc_pollset_work(&exec_ctx, grpc_polling_entity_pollset(&pr.pops), - &worker, gpr_now(GPR_CLOCK_MONOTONIC), - grpc_timeout_seconds_to_deadline(1)))) { + &worker, + grpc_exec_ctx_now(&exec_ctx) + GPR_MS_PER_SEC))) { pr.done = 1; } } @@ -173,7 +173,7 @@ static void got_port_from_server(grpc_exec_ctx *exec_ctx, void *arg, grpc_resource_quota *resource_quota = grpc_resource_quota_create("port_server_client/pick_retry"); grpc_httpcli_get(exec_ctx, pr->ctx, &pr->pops, resource_quota, &req, - grpc_timeout_seconds_to_deadline(10), + grpc_exec_ctx_now(exec_ctx) + 30 * GPR_MS_PER_SEC, GRPC_CLOSURE_CREATE(got_port_from_server, pr, grpc_schedule_on_exec_ctx), &pr->response); @@ -224,7 +224,7 @@ int grpc_pick_port_using_server(void) { grpc_resource_quota_create("port_server_client/pick"); grpc_httpcli_get( &exec_ctx, &context, &pr.pops, resource_quota, &req, - grpc_timeout_seconds_to_deadline(30), + grpc_exec_ctx_now(&exec_ctx) + 30 * GPR_MS_PER_SEC, GRPC_CLOSURE_CREATE(got_port_from_server, &pr, grpc_schedule_on_exec_ctx), &pr.response); grpc_resource_quota_unref_internal(&exec_ctx, resource_quota); @@ -235,8 +235,8 @@ int grpc_pick_port_using_server(void) { if (!GRPC_LOG_IF_ERROR( "pollset_work", grpc_pollset_work(&exec_ctx, grpc_polling_entity_pollset(&pr.pops), - &worker, gpr_now(GPR_CLOCK_MONOTONIC), - grpc_timeout_seconds_to_deadline(1)))) { + &worker, + grpc_exec_ctx_now(&exec_ctx) + GPR_MS_PER_SEC))) { pr.port = 0; } } |