reviewer feedback

reviewable/pr16082/r6
ncteisen 7 years ago
parent e165579d3e
commit 4205b97dd9
  1. 3
      src/cpp/server/channelz/channelz_service.cc
  2. 9
      test/cpp/end2end/channelz_service_test.cc

@ -32,7 +32,6 @@ Status ChannelzService::GetTopChannels(
ServerContext* unused, const channelz::v1::GetTopChannelsRequest* request,
channelz::v1::GetTopChannelsResponse* response) {
char* json_str = grpc_channelz_get_top_channels(request->start_channel_id());
// gpr_log(GPR_ERROR, "%s", json_str);
google::protobuf::util::Status s =
google::protobuf::util::JsonStringToMessage(json_str, response);
gpr_free(json_str);
@ -46,7 +45,6 @@ Status ChannelzService::GetChannel(
ServerContext* unused, const channelz::v1::GetChannelRequest* request,
channelz::v1::GetChannelResponse* response) {
char* json_str = grpc_channelz_get_channel(request->channel_id());
// gpr_log(GPR_ERROR, "%s", json_str);
google::protobuf::util::Status s =
google::protobuf::util::JsonStringToMessage(json_str, response);
gpr_free(json_str);
@ -60,7 +58,6 @@ Status ChannelzService::GetSubchannel(
ServerContext* unused, const channelz::v1::GetSubchannelRequest* request,
channelz::v1::GetSubchannelResponse* response) {
char* json_str = grpc_channelz_get_subchannel(request->subchannel_id());
// gpr_log(GPR_ERROR, "%s", json_str);
google::protobuf::util::Status s =
google::protobuf::util::JsonStringToMessage(json_str, response);
gpr_free(json_str);

@ -360,7 +360,6 @@ TEST_F(ChannelzServerTest, ManySubchannels) {
SendFailedEcho(1);
SendFailedEcho(2);
}
GetTopChannelsRequest gtc_request;
GetTopChannelsResponse gtc_response;
gtc_request.set_start_channel_id(0);
@ -369,11 +368,6 @@ TEST_F(ChannelzServerTest, ManySubchannels) {
channelz_stub_->GetTopChannels(&context, gtc_request, &gtc_response);
EXPECT_TRUE(s.ok()) << s.error_message();
EXPECT_EQ(gtc_response.channel_size(), kNumChannels);
// std::string gtc_str;
// google::protobuf::TextFormat::PrintToString(gtc_response, &gtc_str);
// std::cout << "GetTopChannels:\n" << gtc_str << "\n";
for (int i = 0; i < gtc_response.channel_size(); ++i) {
// if the channel sent no RPCs, then expect no subchannels to have been
// created.
@ -381,8 +375,7 @@ TEST_F(ChannelzServerTest, ManySubchannels) {
EXPECT_EQ(gtc_response.channel(i).subchannel_ref_size(), 0);
continue;
}
// Since this is pick first, we know that there was only one subchannel
// used. We request it here.
// The resolver must return at least one address.
ASSERT_GT(gtc_response.channel(i).subchannel_ref_size(), 0);
GetSubchannelRequest gsc_request;
GetSubchannelResponse gsc_response;

Loading…
Cancel
Save