Skip to content

Commit

Permalink
interop: add channelz to xds interop test server running in non-secur…
Browse files Browse the repository at this point in the history
…e mode
  • Loading branch information
sergiitk committed Jan 6, 2021
1 parent 2c13823 commit 1a3db67
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ public final class XdsTestClient {
private final Map<String, Integer> rpcsStartedByMethod = new HashMap<>();
private final Map<String, Integer> rpcsFailedByMethod = new HashMap<>();
private final Map<String, Integer> rpcsSucceededByMethod = new HashMap<>();
private static final int CHANNELZ_MAX_PAGE_SIZE = 100;

private int numChannels = 1;
private boolean printResponse = false;
Expand Down Expand Up @@ -236,7 +237,7 @@ private void run() {
.addService(new XdsStatsImpl())
.addService(new ConfigureUpdateServiceImpl())
.addService(ProtoReflectionService.newInstance())
.addService(ChannelzService.newInstance(100))
.addService(ChannelzService.newInstance(CHANNELZ_MAX_PAGE_SIZE))
.build();
try {
statsServer.start();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ public final class XdsTestServer {
private static final Context.Key<String> CALL_BEHAVIOR_KEY =
Context.key("rpc-behavior");
private static final String CALL_BEHAVIOR_KEEP_OPEN_VALUE = "keep-open";
private static final int CHANNELZ_MAX_PAGE_SIZE = 100;

private static Logger logger = Logger.getLogger(XdsTestServer.class.getName());

Expand Down Expand Up @@ -176,7 +177,7 @@ private void start() throws Exception {
.addService(new XdsUpdateHealthServiceImpl(health))
.addService(health.getHealthService())
.addService(ProtoReflectionService.newInstance())
.addService(ChannelzService.newInstance(100))
.addService(ChannelzService.newInstance(CHANNELZ_MAX_PAGE_SIZE))
.build()
.start();
} else {
Expand All @@ -188,6 +189,7 @@ private void start() throws Exception {
.addService(new XdsUpdateHealthServiceImpl(health))
.addService(health.getHealthService())
.addService(ProtoReflectionService.newInstance())
.addService(ChannelzService.newInstance(CHANNELZ_MAX_PAGE_SIZE))
.build()
.start();
maintenanceServer = null;
Expand Down

0 comments on commit 1a3db67

Please sign in to comment.