aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/core/end2end/tests/census_simple_request.c
diff options
context:
space:
mode:
authorGravatar Craig Tiller <ctiller@google.com>2015-05-26 16:15:34 -0700
committerGravatar Craig Tiller <ctiller@google.com>2015-05-26 16:15:34 -0700
commitee945e8325ff7d67be6990b6193e19f865ec7b30 (patch)
treefa0d40b2a59de878f4db98636441db680b896cc8 /test/core/end2end/tests/census_simple_request.c
parent9db8f1ade2222a00578abf5300abd1734a0e5ed4 (diff)
Work towards removing grpc_server_shutdown
Diffstat (limited to 'test/core/end2end/tests/census_simple_request.c')
-rw-r--r--test/core/end2end/tests/census_simple_request.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/test/core/end2end/tests/census_simple_request.c b/test/core/end2end/tests/census_simple_request.c
index b808684cd1..191b7361dc 100644
--- a/test/core/end2end/tests/census_simple_request.c
+++ b/test/core/end2end/tests/census_simple_request.c
@@ -60,9 +60,12 @@ static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config,
return f;
}
+static void *tag(gpr_intptr t) { return (void *)t; }
+
static void shutdown_server(grpc_end2end_test_fixture *f) {
if (!f->server) return;
- grpc_server_shutdown(f->server);
+ grpc_server_shutdown_and_notify(f->server, tag(1000));
+ GPR_ASSERT(grpc_completion_queue_pluck(f->server_cq, tag(1000), GRPC_TIMEOUT_SECONDS_TO_DEADLINE(5)).type == GRPC_OP_COMPLETE);
grpc_server_destroy(f->server);
f->server = NULL;
}
@@ -92,8 +95,6 @@ static void end_test(grpc_end2end_test_fixture *f) {
grpc_completion_queue_destroy(f->client_cq);
}
-static void *tag(gpr_intptr t) { return (void *)t; }
-
static void test_body(grpc_end2end_test_fixture f) {
grpc_call *c;
grpc_call *s;