diff options
author | David G. Quintas <dgq@google.com> | 2015-10-01 12:18:14 -0700 |
---|---|---|
committer | David G. Quintas <dgq@google.com> | 2015-10-01 12:18:14 -0700 |
commit | 8f64d5c311ecb3a58fe5075e25732ea1b2467436 (patch) | |
tree | e2e058dd00b2e5eee4cd2fadfacd4f331a769569 | |
parent | 2b2a1ad6ca97da100fd469085f0ffef847e87e65 (diff) | |
parent | 0d55750cb2b8122df3bfb4030c008fe084455000 (diff) |
Merge pull request #3595 from yang-g/channel_state
Maybe the channel is already ready when we call getstatus
-rw-r--r-- | test/cpp/end2end/end2end_test.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/test/cpp/end2end/end2end_test.cc b/test/cpp/end2end/end2end_test.cc index 49a38ce544..0322b2dabe 100644 --- a/test/cpp/end2end/end2end_test.cc +++ b/test/cpp/end2end/end2end_test.cc @@ -734,7 +734,8 @@ TEST_P(End2endTest, ChannelState) { EXPECT_EQ(GRPC_CHANNEL_IDLE, channel_->GetState(true)); EXPECT_TRUE(channel_->WaitForStateChange(GRPC_CHANNEL_IDLE, gpr_inf_future(GPR_CLOCK_REALTIME))); - EXPECT_EQ(GRPC_CHANNEL_CONNECTING, channel_->GetState(false)); + auto state = channel_->GetState(false); + EXPECT_TRUE(state == GRPC_CHANNEL_CONNECTING || state == GRPC_CHANNEL_READY); } // Takes 10s. |