aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/cpp/end2end
diff options
context:
space:
mode:
authorGravatar David G. Quintas <dgq@google.com>2018-08-15 17:58:20 -0700
committerGravatar GitHub <noreply@github.com>2018-08-15 17:58:20 -0700
commita45e38622edd55f2b5c7fea0abf53f35ab68021b (patch)
tree78a630014cb9f164a2092e0423fcfd75c25585a2 /test/cpp/end2end
parent2cb3e823bf052a77aedfea11de9a375314c605bc (diff)
parentd08ea3025b653d63652b65d52fa58517bcfa94e5 (diff)
Merge pull request #16054 from dgquintas/pf_ppicks_fix
Fixed ordering in adding pending picks to PF
Diffstat (limited to 'test/cpp/end2end')
-rw-r--r--test/cpp/end2end/client_lb_end2end_test.cc17
1 files changed, 17 insertions, 0 deletions
diff --git a/test/cpp/end2end/client_lb_end2end_test.cc b/test/cpp/end2end/client_lb_end2end_test.cc
index 7fe0da8aae..26c241b74a 100644
--- a/test/cpp/end2end/client_lb_end2end_test.cc
+++ b/test/cpp/end2end/client_lb_end2end_test.cc
@@ -353,6 +353,23 @@ TEST_F(ClientLbEnd2endTest, PickFirst) {
EXPECT_EQ("pick_first", channel->GetLoadBalancingPolicyName());
}
+TEST_F(ClientLbEnd2endTest, PickFirstProcessPending) {
+ StartServers(1); // Single server
+ auto channel = BuildChannel(""); // test that pick first is the default.
+ auto stub = BuildStub(channel);
+ SetNextResolution({servers_[0]->port_});
+ WaitForServer(stub, 0, DEBUG_LOCATION);
+ // Create a new channel and its corresponding PF LB policy, which will pick
+ // the subchannels in READY state from the previous RPC against the same
+ // target (even if it happened over a different channel, because subchannels
+ // are globally reused). Progress should happen without any transition from
+ // this READY state.
+ auto second_channel = BuildChannel("");
+ auto second_stub = BuildStub(second_channel);
+ SetNextResolution({servers_[0]->port_});
+ CheckRpcSendOk(second_stub, DEBUG_LOCATION);
+}
+
TEST_F(ClientLbEnd2endTest, PickFirstBackOffInitialReconnect) {
ChannelArguments args;
constexpr int kInitialBackOffMs = 100;