diff options
author | 2015-06-18 15:59:55 -0700 | |
---|---|---|
committer | 2015-06-18 15:59:55 -0700 | |
commit | a31c9d27e084017d459bc5c72f96c1a37704dc0b (patch) | |
tree | 762773d259f8d73d16c9917b548181b59cf189d3 /test/core/end2end/tests/early_server_shutdown_finishes_tags.c | |
parent | eb973c8a856846eb52f36ba718758f1c50849288 (diff) | |
parent | 52c6142a30fc74d665bf6d7270c0d6835a9db38f (diff) |
Merge branch 'we-dont-need-no-backup' of git://github.com/ctiller/grpc
Diffstat (limited to 'test/core/end2end/tests/early_server_shutdown_finishes_tags.c')
-rw-r--r-- | test/core/end2end/tests/early_server_shutdown_finishes_tags.c | 31 |
1 files changed, 14 insertions, 17 deletions
diff --git a/test/core/end2end/tests/early_server_shutdown_finishes_tags.c b/test/core/end2end/tests/early_server_shutdown_finishes_tags.c index 0c2cdb78f0..fc03cb01a8 100644 --- a/test/core/end2end/tests/early_server_shutdown_finishes_tags.c +++ b/test/core/end2end/tests/early_server_shutdown_finishes_tags.c @@ -81,18 +81,16 @@ static void shutdown_client(grpc_end2end_test_fixture *f) { static void end_test(grpc_end2end_test_fixture *f) { shutdown_client(f); - grpc_completion_queue_shutdown(f->server_cq); - drain_cq(f->server_cq); - grpc_completion_queue_destroy(f->server_cq); - grpc_completion_queue_shutdown(f->client_cq); - drain_cq(f->client_cq); - grpc_completion_queue_destroy(f->client_cq); + grpc_completion_queue_shutdown(f->cq); + drain_cq(f->cq); + grpc_completion_queue_destroy(f->cq); } static void test_early_server_shutdown_finishes_tags( grpc_end2end_test_config config) { - grpc_end2end_test_fixture f = begin_test(config, "test_early_server_shutdown_finishes_tags", NULL, NULL); - cq_verifier *v_server = cq_verifier_create(f.server_cq); + grpc_end2end_test_fixture f = begin_test( + config, "test_early_server_shutdown_finishes_tags", NULL, NULL); + cq_verifier *cqv = cq_verifier_create(f.cq); grpc_call *s = (void *)1; grpc_call_details call_details; grpc_metadata_array request_metadata_recv; @@ -102,21 +100,20 @@ static void test_early_server_shutdown_finishes_tags( /* upon shutdown, the server should finish all requested calls indicating no new call */ - GPR_ASSERT(GRPC_CALL_OK == - grpc_server_request_call(f.server, &s, &call_details, - &request_metadata_recv, f.server_cq, - f.server_cq, tag(101))); - grpc_server_shutdown_and_notify(f.server, f.server_cq, tag(1000)); - cq_expect_completion(v_server, tag(101), 0); - cq_expect_completion(v_server, tag(1000), 1); - cq_verify(v_server); + GPR_ASSERT(GRPC_CALL_OK == grpc_server_request_call( + f.server, &s, &call_details, + &request_metadata_recv, f.cq, f.cq, tag(101))); + grpc_server_shutdown_and_notify(f.server, f.cq, tag(1000)); + cq_expect_completion(cqv, tag(101), 0); + cq_expect_completion(cqv, tag(1000), 1); + cq_verify(cqv); GPR_ASSERT(s == NULL); grpc_server_destroy(f.server); end_test(&f); config.tear_down_data(&f); - cq_verifier_destroy(v_server); + cq_verifier_destroy(cqv); } void grpc_end2end_tests(grpc_end2end_test_config config) { |