From 1efec95d64facf3bad216f2a873951e2adc861a6 Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Thu, 1 Feb 2018 16:07:58 -0800 Subject: [PATCH] Removed unused argument from ResetStub() --- test/cpp/end2end/client_lb_end2end_test.cc | 27 +++++++++++----------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/test/cpp/end2end/client_lb_end2end_test.cc b/test/cpp/end2end/client_lb_end2end_test.cc index 328ad860615..b85e286e5c7 100644 --- a/test/cpp/end2end/client_lb_end2end_test.cc +++ b/test/cpp/end2end/client_lb_end2end_test.cc @@ -168,8 +168,7 @@ class ClientLbEnd2endTest : public ::testing::Test { return ports; } - void ResetStub(const std::vector& ports, - const grpc::string& lb_policy_name, + void ResetStub(const grpc::string& lb_policy_name, ChannelArguments args = ChannelArguments()) { if (lb_policy_name.size() > 0) { args.SetLoadBalancingPolicyName(lb_policy_name); @@ -292,7 +291,7 @@ TEST_F(ClientLbEnd2endTest, PickFirst) { // Start servers and send one RPC per server. const int kNumServers = 3; StartServers(kNumServers); - ResetStub(GetServersPorts(), ""); // test that pick first is the default. + ResetStub(""); // test that pick first is the default. std::vector ports; for (size_t i = 0; i < servers_.size(); ++i) { ports.emplace_back(servers_[i]->port_); @@ -322,7 +321,7 @@ TEST_F(ClientLbEnd2endTest, PickFirstBackOffInitialReconnect) { args.SetInt(GRPC_ARG_INITIAL_RECONNECT_BACKOFF_MS, kInitialBackOffMs); const std::vector ports = {grpc_pick_unused_port_or_die()}; const gpr_timespec t0 = gpr_now(GPR_CLOCK_MONOTONIC); - ResetStub(ports, "pick_first", args); + ResetStub("pick_first", args); SetNextResolution(ports); // The channel won't become connected (there's no server). ASSERT_FALSE(channel_->WaitForConnected( @@ -350,7 +349,7 @@ TEST_F(ClientLbEnd2endTest, PickFirstBackOffMinReconnect) { constexpr int kMinReconnectBackOffMs = 1000; args.SetInt(GRPC_ARG_MIN_RECONNECT_BACKOFF_MS, kMinReconnectBackOffMs); const std::vector ports = {grpc_pick_unused_port_or_die()}; - ResetStub(ports, "pick_first", args); + ResetStub("pick_first", args); SetNextResolution(ports); // Make connection delay a 10% longer than it's willing to in order to make // sure we are hitting the codepath that waits for the min reconnect backoff. @@ -372,7 +371,7 @@ TEST_F(ClientLbEnd2endTest, PickFirstUpdates) { // Start servers and send one RPC per server. const int kNumServers = 3; StartServers(kNumServers); - ResetStub(GetServersPorts(), "pick_first"); + ResetStub("pick_first"); std::vector ports; // Perform one RPC against the first server. @@ -418,7 +417,7 @@ TEST_F(ClientLbEnd2endTest, PickFirstUpdateSuperset) { // Start servers and send one RPC per server. const int kNumServers = 3; StartServers(kNumServers); - ResetStub(GetServersPorts(), "pick_first"); + ResetStub("pick_first"); std::vector ports; // Perform one RPC against the first server. @@ -448,7 +447,7 @@ TEST_F(ClientLbEnd2endTest, PickFirstManyUpdates) { // Start servers and send one RPC per server. const int kNumServers = 3; StartServers(kNumServers); - ResetStub(GetServersPorts(), "pick_first"); + ResetStub("pick_first"); std::vector ports; for (size_t i = 0; i < servers_.size(); ++i) { ports.emplace_back(servers_[i]->port_); @@ -471,7 +470,7 @@ TEST_F(ClientLbEnd2endTest, RoundRobin) { // Start servers and send one RPC per server. const int kNumServers = 3; StartServers(kNumServers); - ResetStub(GetServersPorts(), "round_robin"); + ResetStub("round_robin"); std::vector ports; for (const auto& server : servers_) { ports.emplace_back(server->port_); @@ -502,7 +501,7 @@ TEST_F(ClientLbEnd2endTest, RoundRobinUpdates) { // Start servers and send one RPC per server. const int kNumServers = 3; StartServers(kNumServers); - ResetStub(GetServersPorts(), "round_robin"); + ResetStub("round_robin"); std::vector ports; // Start with a single server. @@ -585,7 +584,7 @@ TEST_F(ClientLbEnd2endTest, RoundRobinUpdates) { TEST_F(ClientLbEnd2endTest, RoundRobinUpdateInError) { const int kNumServers = 3; StartServers(kNumServers); - ResetStub(GetServersPorts(), "round_robin"); + ResetStub("round_robin"); std::vector ports; // Start with a single server. @@ -617,7 +616,7 @@ TEST_F(ClientLbEnd2endTest, RoundRobinManyUpdates) { // Start servers and send one RPC per server. const int kNumServers = 3; StartServers(kNumServers); - ResetStub(GetServersPorts(), "round_robin"); + ResetStub("round_robin"); std::vector ports; for (size_t i = 0; i < servers_.size(); ++i) { ports.emplace_back(servers_[i]->port_); @@ -645,7 +644,7 @@ TEST_F(ClientLbEnd2endTest, RoundRobinReresolve) { ports.push_back(grpc_pick_unused_port_or_die()); } StartServers(kNumServers, ports); - ResetStub(GetServersPorts(), "round_robin"); + ResetStub("round_robin"); SetNextResolution(ports); // Send a number of RPCs, which succeed. for (size_t i = 0; i < 100; ++i) { @@ -680,7 +679,7 @@ TEST_F(ClientLbEnd2endTest, RoundRobinSingleReconnect) { const int kNumServers = 3; StartServers(kNumServers); const auto ports = GetServersPorts(); - ResetStub(ports, "round_robin"); + ResetStub("round_robin"); SetNextResolution(ports); for (size_t i = 0; i < kNumServers; ++i) WaitForServer(i); for (size_t i = 0; i < servers_.size(); ++i) {