diff options
author | thinkerou <thinkerou@gmail.com> | 2016-05-11 10:24:26 +0800 |
---|---|---|
committer | thinkerou <thinkerou@gmail.com> | 2016-05-11 10:24:26 +0800 |
commit | c4727db4582e8c9bdd1c822fa1d571f19e2f929e (patch) | |
tree | 27ece5b2d5b59add7756687c478f1ba6dee31642 /test/cpp/grpclb/grpclb_api_test.cc | |
parent | f7b01874fde5b276500f69dcd83ca713cde2e10b (diff) | |
parent | 8b382748fd9ce6f5d898e1acf15c97851c4fbd8b (diff) |
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'test/cpp/grpclb/grpclb_api_test.cc')
-rw-r--r-- | test/cpp/grpclb/grpclb_api_test.cc | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/test/cpp/grpclb/grpclb_api_test.cc b/test/cpp/grpclb/grpclb_api_test.cc index 92f93c869c..bf77878e0a 100644 --- a/test/cpp/grpclb/grpclb_api_test.cc +++ b/test/cpp/grpclb/grpclb_api_test.cc @@ -35,13 +35,13 @@ #include <string> #include "src/core/ext/lb_policy/grpclb/load_balancer_api.h" -#include "src/proto/grpc/lb/v0/load_balancer.pb.h" // C++ version +#include "src/proto/grpc/lb/v1/load_balancer.pb.h" // C++ version namespace grpc { namespace { -using grpc::lb::v0::LoadBalanceRequest; -using grpc::lb::v0::LoadBalanceResponse; +using grpc::lb::v1::LoadBalanceRequest; +using grpc::lb::v1::LoadBalanceResponse; class GrpclbTest : public ::testing::Test {}; @@ -60,9 +60,7 @@ TEST_F(GrpclbTest, CreateRequest) { TEST_F(GrpclbTest, ParseResponse) { LoadBalanceResponse response; - const std::string client_config_str = "I'm a client config"; auto* initial_response = response.mutable_initial_response(); - initial_response->set_client_config(client_config_str); auto* client_stats_report_interval = initial_response->mutable_client_stats_report_interval(); client_stats_report_interval->set_seconds(123); @@ -73,10 +71,7 @@ TEST_F(GrpclbTest, ParseResponse) { gpr_slice_from_copied_string(encoded_response.c_str()); grpc_grpclb_response* c_response = grpc_grpclb_response_parse(encoded_slice); EXPECT_TRUE(c_response->has_initial_response); - EXPECT_TRUE(c_response->initial_response.has_client_config); EXPECT_FALSE(c_response->initial_response.has_load_balancer_delegate); - EXPECT_TRUE(strcmp(c_response->initial_response.client_config, - client_config_str.c_str()) == 0); EXPECT_EQ(c_response->initial_response.client_stats_report_interval.seconds, 123); EXPECT_EQ(c_response->initial_response.client_stats_report_interval.nanos, |