diff options
author | David G. Quintas <dgq@google.com> | 2017-04-15 16:00:20 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-04-15 16:00:20 -0700 |
commit | 3ddc13b25212ed02b58aebea36d69424efdfbf79 (patch) | |
tree | 09a80a02fe30d4b131e05821e90a9fde916c0e1f /test/cpp/grpclb | |
parent | 0ece13a2291e500111b06e0e76aafc3d9833a7d3 (diff) | |
parent | a7a1098d2f4a88a038e61a949ee98bd2e5444b7a (diff) |
Merge pull request #10668 from dgquintas/update_lb_proto_2
Updated load_balancer.proto
Diffstat (limited to 'test/cpp/grpclb')
-rw-r--r-- | test/cpp/grpclb/grpclb_api_test.cc | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/test/cpp/grpclb/grpclb_api_test.cc b/test/cpp/grpclb/grpclb_api_test.cc index d9df2bb673..0b569f1415 100644 --- a/test/cpp/grpclb/grpclb_api_test.cc +++ b/test/cpp/grpclb/grpclb_api_test.cc @@ -106,11 +106,13 @@ TEST_F(GrpclbTest, ParseResponseServerList) { auto* server = serverlist->add_servers(); server->set_ip_address(Ip4ToPackedString("127.0.0.1")); server->set_port(12345); - server->set_drop_request(true); + server->set_drop_for_rate_limiting(true); + server->set_drop_for_load_balancing(false); server = response.mutable_server_list()->add_servers(); server->set_ip_address(Ip4ToPackedString("10.0.0.1")); server->set_port(54321); - server->set_drop_request(false); + server->set_drop_for_rate_limiting(false); + server->set_drop_for_load_balancing(true); auto* expiration_interval = serverlist->mutable_expiration_interval(); expiration_interval->set_seconds(888); expiration_interval->set_nanos(999); @@ -125,12 +127,14 @@ TEST_F(GrpclbTest, ParseResponseServerList) { EXPECT_EQ(PackedStringToIp(c_serverlist->servers[0]->ip_address), "127.0.0.1"); EXPECT_EQ(c_serverlist->servers[0]->port, 12345); - EXPECT_TRUE(c_serverlist->servers[0]->drop_request); + EXPECT_TRUE(c_serverlist->servers[0]->drop_for_rate_limiting); + EXPECT_FALSE(c_serverlist->servers[0]->drop_for_load_balancing); EXPECT_TRUE(c_serverlist->servers[1]->has_ip_address); EXPECT_EQ(PackedStringToIp(c_serverlist->servers[1]->ip_address), "10.0.0.1"); EXPECT_EQ(c_serverlist->servers[1]->port, 54321); - EXPECT_FALSE(c_serverlist->servers[1]->drop_request); + EXPECT_FALSE(c_serverlist->servers[1]->drop_for_rate_limiting); + EXPECT_TRUE(c_serverlist->servers[1]->drop_for_load_balancing); EXPECT_TRUE(c_serverlist->expiration_interval.has_seconds); EXPECT_EQ(c_serverlist->expiration_interval.seconds, 888); |