aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/core/end2end/tests/disappearing_server.c
diff options
context:
space:
mode:
authorGravatar Sree Kuchibhotla <sreek@google.com>2017-04-06 13:09:17 -0700
committerGravatar Sree Kuchibhotla <sreek@google.com>2017-04-06 13:09:17 -0700
commita6ff103446ef739b5eb11a76dda2f8b230532cd5 (patch)
treef0a6bf05ef83081c634cffabd233893d69510d1e /test/core/end2end/tests/disappearing_server.c
parent3f182df7de52374e600264af7d76f1f6f73da6b8 (diff)
parenta956d99978c46027663da22ff758506e83f1b7f5 (diff)
Merge branch 'master' into cq_create_api_changes
Diffstat (limited to 'test/core/end2end/tests/disappearing_server.c')
-rw-r--r--test/core/end2end/tests/disappearing_server.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/test/core/end2end/tests/disappearing_server.c b/test/core/end2end/tests/disappearing_server.c
index d7265a7780..22492c0bfc 100644
--- a/test/core/end2end/tests/disappearing_server.c
+++ b/test/core/end2end/tests/disappearing_server.c
@@ -45,16 +45,18 @@
static void *tag(intptr_t t) { return (void *)t; }
-static gpr_timespec n_seconds_time(int n) {
+static gpr_timespec n_seconds_from_now(int n) {
return grpc_timeout_seconds_to_deadline(n);
}
-static gpr_timespec five_seconds_time(void) { return n_seconds_time(5); }
+static gpr_timespec five_seconds_from_now(void) {
+ return n_seconds_from_now(5);
+}
static void drain_cq(grpc_completion_queue *cq) {
grpc_event ev;
do {
- ev = grpc_completion_queue_next(cq, five_seconds_time(), NULL);
+ ev = grpc_completion_queue_next(cq, five_seconds_from_now(), NULL);
} while (ev.type != GRPC_QUEUE_SHUTDOWN);
}
@@ -87,7 +89,6 @@ static void do_request_and_shutdown_server(grpc_end2end_test_config config,
cq_verifier *cqv) {
grpc_call *c;
grpc_call *s;
- gpr_timespec deadline = five_seconds_time();
grpc_op ops[6];
grpc_op *op;
grpc_metadata_array initial_metadata_recv;
@@ -99,6 +100,7 @@ static void do_request_and_shutdown_server(grpc_end2end_test_config config,
grpc_slice details;
int was_cancelled = 2;
+ gpr_timespec deadline = five_seconds_from_now();
c = grpc_channel_create_call(
f->client, NULL, GRPC_PROPAGATE_DEFAULTS, f->cq,
grpc_slice_from_static_string("/foo"),