diff options
author | Craig Tiller <ctiller@google.com> | 2017-04-05 09:04:40 -0700 |
---|---|---|
committer | Craig Tiller <ctiller@google.com> | 2017-04-05 09:04:40 -0700 |
commit | 2ce0bfa8b47376aefbfadc5e1b6c5164b88842fe (patch) | |
tree | 07a5aba2c4af15c7802be49d68054d97ee833375 /test/core/end2end/tests/negative_deadline.c | |
parent | b1d3dcdb7db540b7dfa2efad269cd56738ff7e79 (diff) | |
parent | bbcf378192d949c1a81cdae96a584e8e7b453e81 (diff) |
Merge github.com:grpc/grpc into foo
Diffstat (limited to 'test/core/end2end/tests/negative_deadline.c')
-rw-r--r-- | test/core/end2end/tests/negative_deadline.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/test/core/end2end/tests/negative_deadline.c b/test/core/end2end/tests/negative_deadline.c index 0b61efbac9..e7448bd6bc 100644 --- a/test/core/end2end/tests/negative_deadline.c +++ b/test/core/end2end/tests/negative_deadline.c @@ -59,16 +59,18 @@ static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config, return f; } -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); } @@ -100,7 +102,6 @@ static void end_test(grpc_end2end_test_fixture *f) { static void simple_request_body(grpc_end2end_test_config config, grpc_end2end_test_fixture f, size_t num_ops) { grpc_call *c; - gpr_timespec deadline = gpr_inf_past(GPR_CLOCK_REALTIME); cq_verifier *cqv = cq_verifier_create(f.cq); grpc_op ops[6]; grpc_op *op; @@ -112,6 +113,7 @@ static void simple_request_body(grpc_end2end_test_config config, gpr_log(GPR_DEBUG, "test with %" PRIuPTR " ops", num_ops); + gpr_timespec deadline = gpr_inf_past(GPR_CLOCK_REALTIME); c = grpc_channel_create_call( f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq, grpc_slice_from_static_string("/foo"), |