diff --git a/examples/webserver/grpc-random/README.md b/examples/webserver/grpc-random/README.md index f7bee41f..795fa079 100644 --- a/examples/webserver/grpc-random/README.md +++ b/examples/webserver/grpc-random/README.md @@ -1,4 +1,4 @@ -# Helidon gRPC SE Randome Example +# Helidon gRPC SE Random Example This example shows a simple _Random_ service written with the Helidon gRPC SE diff --git a/examples/webserver/grpc-random/src/main/java/io/helidon/examples/webserver/grpc/random/Main.java b/examples/webserver/grpc-random/src/main/java/io/helidon/examples/webserver/grpc/random/Main.java index 81376ada..023a656e 100644 --- a/examples/webserver/grpc-random/src/main/java/io/helidon/examples/webserver/grpc/random/Main.java +++ b/examples/webserver/grpc-random/src/main/java/io/helidon/examples/webserver/grpc/random/Main.java @@ -39,7 +39,7 @@ public static void main(String[] args) { Config.global(config); Config serverConfig = config.get("server"); - // start server and register gRPC routing and health check + // start server and register gRPC routing WebServer.builder() .config(serverConfig) .addRouting(GrpcRouting.builder().service(new RandomService())) diff --git a/examples/webserver/grpc-random/src/test/java/io/helidon/examples/webserver/grpc/random/RandomServiceTest.java b/examples/webserver/grpc-random/src/test/java/io/helidon/examples/webserver/grpc/random/RandomServiceTest.java index 312d9ab3..3aa63562 100644 --- a/examples/webserver/grpc-random/src/test/java/io/helidon/examples/webserver/grpc/random/RandomServiceTest.java +++ b/examples/webserver/grpc-random/src/test/java/io/helidon/examples/webserver/grpc/random/RandomServiceTest.java @@ -26,9 +26,11 @@ import io.helidon.common.configurable.Resource; import io.helidon.common.tls.Tls; +import io.helidon.config.Config; import io.helidon.examples.webserver.grpc.random.Random.ParamMessage; import io.helidon.webclient.api.WebClient; import io.helidon.webclient.grpc.GrpcClient; +import io.helidon.webclient.grpc.GrpcClientProtocolConfig; import io.helidon.webserver.Router; import io.helidon.webserver.WebServer; import io.helidon.webserver.grpc.GrpcRouting; @@ -65,9 +67,14 @@ private RandomServiceTest(WebServer server) { .trustStore(true) .keystore(Resource.create("client.p12")))) .build(); + Config config = Config.create(); + GrpcClientProtocolConfig protocolConfig = GrpcClientProtocolConfig.builder() + .config(config.get("grpc-protocol-config")) + .build(); this.webClient = WebClient.builder() .tls(clientTls) .baseUri("https://localhost:" + server.port()) + .addProtocolConfig(protocolConfig) .build(); } diff --git a/examples/webserver/grpc-random/src/test/resources/application.yaml b/examples/webserver/grpc-random/src/test/resources/application.yaml index 00b3aef2..a46f02dc 100644 --- a/examples/webserver/grpc-random/src/test/resources/application.yaml +++ b/examples/webserver/grpc-random/src/test/resources/application.yaml @@ -28,3 +28,9 @@ server: passphrase: "password" resource: resource-path: "server.p12" + +grpc-protocol-config: + poll-wait-time: PT30S + abort-poll-time-expired: true + init-buffer-size: 10000 + heartbeat-period: PT10S \ No newline at end of file diff --git a/examples/webserver/grpc/src/test/resources/application.yaml b/examples/webserver/grpc/src/test/resources/application.yaml index fa5b0ee7..c77abef3 100644 --- a/examples/webserver/grpc/src/test/resources/application.yaml +++ b/examples/webserver/grpc/src/test/resources/application.yaml @@ -33,9 +33,3 @@ server: observers: health: details: true - -grpc-client: - poll-wait-time: PT30S - abort-poll-time-expired: true - init-buffer-size: 10000 - heartbeat-period: PT10S \ No newline at end of file