From 8219e26c1e509817afe2fb383c97d04cb0302f0c Mon Sep 17 00:00:00 2001 From: Dave Syer Date: Wed, 22 Jan 2025 07:55:38 +0000 Subject: [PATCH] Make sample run OOTB with 2 ports --- .../grpc-webflux/src/main/resources/application.properties | 1 + .../grpc/sample/GrpcServerApplicationTests.java | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/samples/grpc-webflux/src/main/resources/application.properties b/samples/grpc-webflux/src/main/resources/application.properties index 566605a..cec6cf4 100644 --- a/samples/grpc-webflux/src/main/resources/application.properties +++ b/samples/grpc-webflux/src/main/resources/application.properties @@ -1 +1,2 @@ spring.application.name=grpc-server +spring.grpc.server.reactive.enabled=false \ No newline at end of file diff --git a/samples/grpc-webflux/src/test/java/org/springframework/grpc/sample/GrpcServerApplicationTests.java b/samples/grpc-webflux/src/test/java/org/springframework/grpc/sample/GrpcServerApplicationTests.java index 42dfe47..be81041 100644 --- a/samples/grpc-webflux/src/test/java/org/springframework/grpc/sample/GrpcServerApplicationTests.java +++ b/samples/grpc-webflux/src/test/java/org/springframework/grpc/sample/GrpcServerApplicationTests.java @@ -19,14 +19,14 @@ import org.springframework.grpc.sample.proto.SimpleGrpc; import org.springframework.grpc.test.LocalGrpcPort; import org.springframework.test.annotation.DirtiesContext; -@SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT, properties = "spring.grpc.server.reactive.enabled=false") +@SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT) public class GrpcServerApplicationTests { private static Log log = LogFactory.getLog(GrpcServerApplicationTests.class); public static void main(String[] args) { new SpringApplicationBuilder(GrpcServerApplication.class, ExtraConfiguration.class) - .run("--spring.grpc.server.reactive.enabled=false"); + .run(args); } @Autowired