From 90797b91a25ff7a0e0b76a26c76c88c9f3b9ada1 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Thu, 24 Mar 2016 09:48:39 -0700 Subject: Check connectivity flicker in goaway test --- test/core/end2end/goaway_server_test.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'test') diff --git a/test/core/end2end/goaway_server_test.c b/test/core/end2end/goaway_server_test.c index 8890c0c196..8432403ae0 100644 --- a/test/core/end2end/goaway_server_test.c +++ b/test/core/end2end/goaway_server_test.c @@ -175,6 +175,12 @@ int main(int argc, char **argv) { cq_expect_completion(cqv, tag(0x301), 1); cq_verify(cqv); + GPR_ASSERT(GRPC_CHANNEL_READY == + grpc_channel_check_connectivity_state(chan, 0)); + grpc_channel_watch_connectivity_state(chan, GRPC_CHANNEL_READY, + gpr_inf_future(GPR_CLOCK_REALTIME), cq, + tag(0x9999)); + /* listen for close on the server call to probe for finishing */ op = ops; op->op = GRPC_OP_RECV_CLOSE_ON_SERVER; @@ -185,9 +191,12 @@ int main(int argc, char **argv) { (size_t)(op - ops), tag(0x302), NULL)); - /* shutdown first server: we should see nothing */ + /* shutdown first server: + * we should see a connectivity change and then nothing */ set_resolve_port(-1); grpc_server_shutdown_and_notify(server1, cq, tag(0xdead1)); + cq_expect_completion(cqv, tag(0x9999), 1); + cq_verify(cqv); cq_verify_empty(cqv); /* and a new call: should go through to server2 when we start it */ -- cgit v1.2.3