aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/core/end2end/tests
diff options
context:
space:
mode:
authorGravatar Craig Tiller <craig.tiller@gmail.com>2015-05-11 10:38:07 -0700
committerGravatar Craig Tiller <craig.tiller@gmail.com>2015-05-11 10:38:07 -0700
commit65ad0a73cb4c2f144b86eca509ce7b2de576bb71 (patch)
treee13bdfad467ed9a391725b589fdc4536b50bf11c /test/core/end2end/tests
parentb1fa1d55775a5e617ac5d47039597ac5517ea000 (diff)
Starting to clean up tests
Diffstat (limited to 'test/core/end2end/tests')
-rw-r--r--test/core/end2end/tests/bad_hostname.c13
-rw-r--r--test/core/end2end/tests/cancel_after_accept.c14
2 files changed, 10 insertions, 17 deletions
diff --git a/test/core/end2end/tests/bad_hostname.c b/test/core/end2end/tests/bad_hostname.c
index 671f232ee3..7a646a7de7 100644
--- a/test/core/end2end/tests/bad_hostname.c
+++ b/test/core/end2end/tests/bad_hostname.c
@@ -95,18 +95,15 @@ static void end_test(grpc_end2end_test_fixture *f) {
shutdown_server(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);
+ grpc_completion_queue_shutdown(f->cq);
drain_cq(f->client_cq);
- grpc_completion_queue_destroy(f->client_cq);
+ grpc_completion_queue_destroy(f->cq);
}
static void simple_request_body(grpc_end2end_test_fixture f) {
grpc_call *c;
gpr_timespec deadline = five_seconds_time();
- cq_verifier *v_client = cq_verifier_create(f.client_cq);
+ cq_verifier *cqv = cq_verifier_create(f.cq);
grpc_op ops[6];
grpc_op *op;
grpc_metadata_array initial_metadata_recv;
@@ -143,8 +140,8 @@ static void simple_request_body(grpc_end2end_test_fixture f) {
op++;
GPR_ASSERT(GRPC_CALL_OK == grpc_call_start_batch(c, ops, op - ops, tag(1)));
- cq_expect_completion(v_client, tag(1), GRPC_OP_OK);
- cq_verify(v_client);
+ cq_expect_completion(cqv, tag(1), GRPC_OP_OK);
+ cq_verify(cqv);
GPR_ASSERT(status == GRPC_STATUS_UNAUTHENTICATED);
diff --git a/test/core/end2end/tests/cancel_after_accept.c b/test/core/end2end/tests/cancel_after_accept.c
index 184434cc97..a9c6e86ade 100644
--- a/test/core/end2end/tests/cancel_after_accept.c
+++ b/test/core/end2end/tests/cancel_after_accept.c
@@ -94,12 +94,9 @@ static void end_test(grpc_end2end_test_fixture *f) {
shutdown_server(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);
}
/* Cancel after accept, no payload */
@@ -111,8 +108,7 @@ static void test_cancel_after_accept(grpc_end2end_test_config config,
grpc_call *s;
grpc_end2end_test_fixture f = begin_test(config, __FUNCTION__, NULL, NULL);
gpr_timespec deadline = five_seconds_time();
- cq_verifier *v_client = cq_verifier_create(f.client_cq);
- cq_verifier *v_server = cq_verifier_create(f.server_cq);
+ cq_verifier *cqv = cq_verifier_create(f.cq);
grpc_metadata_array initial_metadata_recv;
grpc_metadata_array trailing_metadata_recv;
grpc_metadata_array request_metadata_recv;
@@ -162,7 +158,7 @@ static void test_cancel_after_accept(grpc_end2end_test_config config,
GPR_ASSERT(GRPC_CALL_OK == grpc_server_request_call(
f.server, &s, &call_details,
- &request_metadata_recv, f.server_cq, tag(2)));
+ &request_metadata_recv, f.cq, tag(2)));
cq_expect_completion(v_server, tag(2), GRPC_OP_OK);
cq_verify(v_server);