diff options
author | Craig Tiller <ctiller@google.com> | 2016-03-24 09:48:39 -0700 |
---|---|---|
committer | Craig Tiller <ctiller@google.com> | 2016-03-24 09:48:39 -0700 |
commit | 90797b91a25ff7a0e0b76a26c76c88c9f3b9ada1 (patch) | |
tree | 76a9e9adfeae6cbd7a3df726281a92268f0a51a1 /test | |
parent | 60b57f429fee17bca351c6fb5f054f192331aece (diff) |
Check connectivity flicker in goaway test
Diffstat (limited to 'test')
-rw-r--r-- | test/core/end2end/goaway_server_test.c | 11 |
1 files changed, 10 insertions, 1 deletions
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 */ |