Add default service config to GrpcClientProperties

Ensure that it doesn't conflict with health service configuration.

Also ensure random port is used in all tests.

Fixes gh-171 (as far as we can)
This commit is contained in:
Dave Syer
2025-06-16 09:22:23 +01:00
parent ced5936c02
commit 08988c042f
9 changed files with 50 additions and 13 deletions

View File

@@ -15,7 +15,8 @@ import org.springframework.grpc.sample.proto.SimpleGrpc;
import org.springframework.test.annotation.DirtiesContext;
@SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT,
properties = "spring.grpc.client.default-channel.address=0.0.0.0:${local.grpc.port}")
properties = { "spring.grpc.client.default-channel.address=0.0.0.0:${local.grpc.port}",
"spring.grpc.server.port=0" })
@DirtiesContext
public class GrpcServerApplicationTests {