Use same queue for batch ops and for shutdown in h2_ssl_cert_test

pull/14769/head
Yash Tibrewal 7 years ago
parent eb8af5c733
commit 717fff3faf
  1. 16
      test/core/end2end/h2_ssl_cert_test.cc

@ -57,8 +57,6 @@ static grpc_end2end_test_fixture chttp2_create_fixture_secure_fullstack(
f.fixture_data = ffd;
f.cq = grpc_completion_queue_create_for_next(nullptr);
f.shutdown_cq = grpc_completion_queue_create_for_pluck(nullptr);
return f;
}
@ -283,14 +281,11 @@ static void shutdown_server(grpc_end2end_test_fixture* f) {
* thread for the server to poll the completion queue while the shutdown
* progresses.)
*/
GPR_ASSERT(grpc_completion_queue_next(
f->cq, grpc_timeout_milliseconds_to_deadline(100), nullptr)
.type == GRPC_QUEUE_TIMEOUT);
grpc_server_shutdown_and_notify(f->server, f->shutdown_cq, tag(1000));
GPR_ASSERT(grpc_completion_queue_pluck(f->shutdown_cq, tag(1000),
grpc_timeout_seconds_to_deadline(5),
nullptr)
.type == GRPC_OP_COMPLETE);
grpc_server_shutdown_and_notify(f->server, f->cq, tag(1000));
grpc_event ev = grpc_completion_queue_next(
f->cq, grpc_timeout_seconds_to_deadline(5), nullptr);
ASSERT_EQ(ev.type, GRPC_OP_COMPLETE);
ASSERT_EQ(ev.tag, tag(1000));
grpc_server_destroy(f->server);
f->server = nullptr;
}
@ -308,7 +303,6 @@ static void end_test(grpc_end2end_test_fixture* f) {
grpc_completion_queue_shutdown(f->cq);
drain_cq(f->cq);
grpc_completion_queue_destroy(f->cq);
grpc_completion_queue_destroy(f->shutdown_cq);
}
static void simple_request_body(grpc_end2end_test_fixture f,

Loading…
Cancel
Save