diff options
-rw-r--r-- | interop-testing/build.gradle | 1 | ||||
-rw-r--r-- | interop-testing/src/main/java/io/grpc/testing/integration/XdsTestServer.java | 12 |
2 files changed, 12 insertions, 1 deletions
diff --git a/interop-testing/build.gradle b/interop-testing/build.gradle index ad833f73f..7d7c9b272 100644 --- a/interop-testing/build.gradle +++ b/interop-testing/build.gradle @@ -24,6 +24,7 @@ dependencies { project(':grpc-netty'), project(':grpc-okhttp'), project(':grpc-protobuf'), + project(':grpc-services'), project(':grpc-stub'), project(':grpc-testing'), libraries.google_auth_oauth2_http, diff --git a/interop-testing/src/main/java/io/grpc/testing/integration/XdsTestServer.java b/interop-testing/src/main/java/io/grpc/testing/integration/XdsTestServer.java index 915be98a4..fc8a4f60b 100644 --- a/interop-testing/src/main/java/io/grpc/testing/integration/XdsTestServer.java +++ b/interop-testing/src/main/java/io/grpc/testing/integration/XdsTestServer.java @@ -17,7 +17,9 @@ package io.grpc.testing.integration; import io.grpc.Server; +import io.grpc.health.v1.HealthCheckResponse.ServingStatus; import io.grpc.netty.NettyServerBuilder; +import io.grpc.services.HealthStatusManager; import io.grpc.stub.StreamObserver; import io.grpc.testing.integration.Messages.SimpleRequest; import io.grpc.testing.integration.Messages.SimpleResponse; @@ -33,6 +35,7 @@ public final class XdsTestServer { private int port = 8080; private String serverId = "java_server"; + private HealthStatusManager health; private Server server; /** @@ -107,7 +110,14 @@ public final class XdsTestServer { } private void start() throws Exception { - server = NettyServerBuilder.forPort(port).addService(new TestServiceImpl()).build().start(); + health = new HealthStatusManager(); + server = + NettyServerBuilder.forPort(port) + .addService(new TestServiceImpl()) + .addService(health.getHealthService()) + .build() + .start(); + health.setStatus("", ServingStatus.SERVING); } private void stop() throws Exception { |