aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/core/end2end/tests/binary_metadata.c
diff options
context:
space:
mode:
authorGravatar Muxi Yan <mxyan@google.com>2017-04-07 09:48:14 -0700
committerGravatar Muxi Yan <mxyan@google.com>2017-04-07 09:48:14 -0700
commit3a0b8477c206e45ff1866f73daa4f91643e5bf16 (patch)
tree5abfb781524b99956a83736f38459e7d8a7c244f /test/core/end2end/tests/binary_metadata.c
parent01499e051e3c55410ba09b39b9e6431de43f53b7 (diff)
parentdd550c7316069973c8729bfeca23d4f9a60fd2ca (diff)
Merge remote-tracking branch 'upstream/master' into lazy-deframe
Diffstat (limited to 'test/core/end2end/tests/binary_metadata.c')
-rw-r--r--test/core/end2end/tests/binary_metadata.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/test/core/end2end/tests/binary_metadata.c b/test/core/end2end/tests/binary_metadata.c
index 7fb60f4495..9cb17c9d42 100644
--- a/test/core/end2end/tests/binary_metadata.c
+++ b/test/core/end2end/tests/binary_metadata.c
@@ -57,16 +57,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);
}
@@ -108,7 +110,6 @@ static void test_request_response_with_metadata_and_payload(
grpc_raw_byte_buffer_create(&request_payload_slice, 1);
grpc_byte_buffer *response_payload =
grpc_raw_byte_buffer_create(&response_payload_slice, 1);
- gpr_timespec deadline = five_seconds_time();
grpc_metadata meta_c[2] = {
{grpc_slice_from_static_string("key1-bin"),
grpc_slice_from_static_string(
@@ -147,6 +148,7 @@ static void test_request_response_with_metadata_and_payload(
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"),