Skip to content

Conversation

@rogerwalt
Copy link
Contributor

Log a warning when overriding port in TEST mode.

As discussed in #35559 the port of gRPC servers and clients is overridden in LaunchMode TEST.

Example:

quarkus.grpc.clients.my-client.port=1234 # this is ignored (IMHO wrong)
quarkus.grpc.clients.my-client.test-port=9000 # this is how it has to be done in order to test a grpc client

In order not to change this (probably) desired behaviour and not let people in the future waste hours of their time, at least we now have a warning message.

Fixes #35559

Log a warning when overriding port in TEST mode.
@quarkus-bot quarkus-bot bot added the area/grpc gRPC label Oct 30, 2025
// handle client port
int port = config.port();
if (LaunchMode.current() == LaunchMode.TEST) {
LOGGER.info("LaunchMode {} detected. Overriding existing port configuration for gRPC client/server .", LaunchMode.TEST);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps suggest a fix via the exact property usage.
It's a bit longer msg, but we have a similar long one for use-separate-server ... ;-)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why having a format if you know everything?

// handle client port
int port = config.port();
if (LaunchMode.current() == LaunchMode.TEST) {
LOGGER.info("LaunchMode {} detected. Overriding existing port configuration for gRPC client/server .", LaunchMode.TEST);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why having a format if you know everything?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Integration testing gRPC clients forces port 9001

4 participants