aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/core/http
diff options
context:
space:
mode:
Diffstat (limited to 'test/core/http')
-rw-r--r--test/core/http/httpcli_test.c11
-rw-r--r--test/core/http/httpscli_test.c11
2 files changed, 10 insertions, 12 deletions
diff --git a/test/core/http/httpcli_test.c b/test/core/http/httpcli_test.c
index 8a53903763..cc1c16d695 100644
--- a/test/core/http/httpcli_test.c
+++ b/test/core/http/httpcli_test.c
@@ -35,8 +35,9 @@ static grpc_httpcli_context g_context;
static gpr_mu *g_mu;
static grpc_polling_entity g_pops;
-static gpr_timespec n_seconds_time(int seconds) {
- return grpc_timeout_seconds_to_deadline(seconds);
+static grpc_millis n_seconds_time(int seconds) {
+ return grpc_timespec_to_millis_round_up(
+ grpc_timeout_seconds_to_deadline(seconds));
}
static void on_finish(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) {
@@ -86,8 +87,7 @@ static void test_get(int port) {
GPR_ASSERT(GRPC_LOG_IF_ERROR(
"pollset_work",
grpc_pollset_work(&exec_ctx, grpc_polling_entity_pollset(&g_pops),
- &worker, gpr_now(GPR_CLOCK_MONOTONIC),
- n_seconds_time(1))));
+ &worker, n_seconds_time(1))));
gpr_mu_unlock(g_mu);
grpc_exec_ctx_finish(&exec_ctx);
gpr_mu_lock(g_mu);
@@ -128,8 +128,7 @@ static void test_post(int port) {
GPR_ASSERT(GRPC_LOG_IF_ERROR(
"pollset_work",
grpc_pollset_work(&exec_ctx, grpc_polling_entity_pollset(&g_pops),
- &worker, gpr_now(GPR_CLOCK_MONOTONIC),
- n_seconds_time(1))));
+ &worker, n_seconds_time(1))));
gpr_mu_unlock(g_mu);
grpc_exec_ctx_finish(&exec_ctx);
gpr_mu_lock(g_mu);
diff --git a/test/core/http/httpscli_test.c b/test/core/http/httpscli_test.c
index c7455bd8df..f8a3cfdd76 100644
--- a/test/core/http/httpscli_test.c
+++ b/test/core/http/httpscli_test.c
@@ -35,8 +35,9 @@ static grpc_httpcli_context g_context;
static gpr_mu *g_mu;
static grpc_polling_entity g_pops;
-static gpr_timespec n_seconds_time(int seconds) {
- return grpc_timeout_seconds_to_deadline(seconds);
+static grpc_millis n_seconds_time(int seconds) {
+ return grpc_timespec_to_millis_round_up(
+ grpc_timeout_seconds_to_deadline(seconds));
}
static void on_finish(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) {
@@ -87,8 +88,7 @@ static void test_get(int port) {
GPR_ASSERT(GRPC_LOG_IF_ERROR(
"pollset_work",
grpc_pollset_work(&exec_ctx, grpc_polling_entity_pollset(&g_pops),
- &worker, gpr_now(GPR_CLOCK_MONOTONIC),
- n_seconds_time(1))));
+ &worker, n_seconds_time(1))));
gpr_mu_unlock(g_mu);
grpc_exec_ctx_finish(&exec_ctx);
gpr_mu_lock(g_mu);
@@ -130,8 +130,7 @@ static void test_post(int port) {
GPR_ASSERT(GRPC_LOG_IF_ERROR(
"pollset_work",
grpc_pollset_work(&exec_ctx, grpc_polling_entity_pollset(&g_pops),
- &worker, gpr_now(GPR_CLOCK_MONOTONIC),
- n_seconds_time(1))));
+ &worker, n_seconds_time(1))));
gpr_mu_unlock(g_mu);
grpc_exec_ctx_finish(&exec_ctx);
gpr_mu_lock(g_mu);