aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/core/util
diff options
context:
space:
mode:
authorGravatar Craig Tiller <ctiller@google.com>2017-05-12 09:55:30 -0700
committerGravatar Craig Tiller <ctiller@google.com>2017-05-12 09:55:30 -0700
commitdc3998e7103a0f5e325787da3ab0a32ec402468e (patch)
treec79583c35be5da5151ed10db5b81a73fdcbb6394 /test/core/util
parent909a984a9248a7ccfc6aadb750dcf9e689b208bd (diff)
Converting code
Diffstat (limited to 'test/core/util')
-rw-r--r--test/core/util/port_server_client.c14
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 6ef0acfc29..efe2075682 100644
--- a/test/core/util/port_server_client.c
+++ b/test/core/util/port_server_client.c
@@ -102,7 +102,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);
@@ -113,8 +113,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;
}
}
@@ -185,7 +185,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);
@@ -235,7 +235,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);
@@ -245,8 +245,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;
}
}