diff options
author | David Garcia Quintas <dgq@google.com> | 2015-08-18 16:11:09 -0700 |
---|---|---|
committer | David Garcia Quintas <dgq@google.com> | 2015-08-18 16:11:09 -0700 |
commit | 7fc37a23856604259a0b048e0df00ef3065a58d8 (patch) | |
tree | 9e3b7622f474d15a43b753912582234b81588e32 /test/core/end2end/tests/default_host.c | |
parent | beac88ca56f4710e86668f2cbbd80e02e0607f9c (diff) | |
parent | 7ff63f6abad6c49a7b88b036c54075a03433457c (diff) |
Merge branch 'master' of github.com:grpc/grpc into compression-accept-encoding
Diffstat (limited to 'test/core/end2end/tests/default_host.c')
-rw-r--r-- | test/core/end2end/tests/default_host.c | 28 |
1 files changed, 17 insertions, 11 deletions
diff --git a/test/core/end2end/tests/default_host.c b/test/core/end2end/tests/default_host.c index 920449f4fa..91330c718e 100644 --- a/test/core/end2end/tests/default_host.c +++ b/test/core/end2end/tests/default_host.c @@ -70,15 +70,15 @@ static gpr_timespec five_seconds_time(void) { return n_seconds_time(5); } static void drain_cq(grpc_completion_queue *cq) { grpc_event ev; do { - ev = grpc_completion_queue_next(cq, five_seconds_time()); + ev = grpc_completion_queue_next(cq, five_seconds_time(), NULL); } while (ev.type != GRPC_QUEUE_SHUTDOWN); } static void shutdown_server(grpc_end2end_test_fixture *f) { if (!f->server) return; grpc_server_shutdown_and_notify(f->server, f->cq, tag(1000)); - GPR_ASSERT(grpc_completion_queue_pluck(f->cq, tag(1000), - GRPC_TIMEOUT_SECONDS_TO_DEADLINE(5)) + GPR_ASSERT(grpc_completion_queue_pluck( + f->cq, tag(1000), GRPC_TIMEOUT_SECONDS_TO_DEADLINE(5), NULL) .type == GRPC_OP_COMPLETE); grpc_server_destroy(f->server); f->server = NULL; @@ -111,13 +111,14 @@ static void simple_request_body(grpc_end2end_test_fixture f) { grpc_metadata_array request_metadata_recv; grpc_call_details call_details; grpc_status_code status; + grpc_call_error error; char *details = NULL; size_t details_capacity = 0; int was_cancelled = 2; char *peer; c = grpc_channel_create_call(f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq, - "/foo", NULL, deadline); + "/foo", NULL, deadline, NULL); GPR_ASSERT(c); peer = grpc_call_get_peer(c); @@ -149,11 +150,13 @@ static void simple_request_body(grpc_end2end_test_fixture f) { op->data.recv_status_on_client.status_details_capacity = &details_capacity; op->flags = 0; op++; - GPR_ASSERT(GRPC_CALL_OK == grpc_call_start_batch(c, ops, op - ops, tag(1))); + error = grpc_call_start_batch(c, ops, op - ops, tag(1), NULL); + GPR_ASSERT(error == GRPC_CALL_OK); - GPR_ASSERT(GRPC_CALL_OK == grpc_server_request_call( - f.server, &s, &call_details, - &request_metadata_recv, f.cq, f.cq, tag(101))); + error = + grpc_server_request_call(f.server, &s, &call_details, + &request_metadata_recv, f.cq, f.cq, tag(101)); + GPR_ASSERT(error == GRPC_CALL_OK); cq_expect_completion(cqv, tag(101), 1); cq_verify(cqv); @@ -181,7 +184,8 @@ static void simple_request_body(grpc_end2end_test_fixture f) { op->data.recv_close_on_server.cancelled = &was_cancelled; op->flags = 0; op++; - GPR_ASSERT(GRPC_CALL_OK == grpc_call_start_batch(s, ops, op - ops, tag(102))); + error = grpc_call_start_batch(s, ops, op - ops, tag(102), NULL); + GPR_ASSERT(error == GRPC_CALL_OK); cq_expect_completion(cqv, tag(102), 1); cq_expect_completion(cqv, tag(1), 1); @@ -215,7 +219,9 @@ static void test_invoke_simple_request(grpc_end2end_test_config config) { } void grpc_end2end_tests(grpc_end2end_test_config config) { - if ((config.feature_mask & FEATURE_MASK_SUPPORTS_HOSTNAME_VERIFICATION) != 0) return; - if ((config.feature_mask & FEATURE_MASK_SUPPORTS_DELAYED_CONNECTION) == 0) return; + if ((config.feature_mask & FEATURE_MASK_SUPPORTS_HOSTNAME_VERIFICATION) != 0) + return; + if ((config.feature_mask & FEATURE_MASK_SUPPORTS_DELAYED_CONNECTION) == 0) + return; test_invoke_simple_request(config); } |