interop-testing: assign server as soon as it is built instead of after start (#8662)

This commit is contained in:
sanjaypujare 2021-11-04 12:31:11 -07:00 committed by GitHub
parent efec994f4c
commit c0b8eff984
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 6 deletions

View File

@ -180,16 +180,16 @@ public final class XdsTestServer {
.addService(
ServerInterceptors.intercept(
new TestServiceImpl(serverId, host), new TestInfoInterceptor(host)))
.build()
.start();
.build();
server.start();
maintenanceServer =
NettyServerBuilder.forPort(maintenancePort)
.addService(new XdsUpdateHealthServiceImpl(health))
.addService(health.getHealthService())
.addService(ProtoReflectionService.newInstance())
.addServices(AdminInterface.getStandardServices())
.build()
.start();
.build();
maintenanceServer.start();
} else {
server =
NettyServerBuilder.forPort(port)
@ -200,8 +200,8 @@ public final class XdsTestServer {
.addService(health.getHealthService())
.addService(ProtoReflectionService.newInstance())
.addServices(AdminInterface.getStandardServices())
.build()
.start();
.build();
server.start();
maintenanceServer = null;
}
health.setStatus("", ServingStatus.SERVING);