-
Notifications
You must be signed in to change notification settings - Fork 3k
Add warning for port override in TEST mode #50785
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Log a warning when overriding port in TEST mode.
extensions/grpc/runtime/src/main/java/io/quarkus/grpc/runtime/supports/Channels.java
Outdated
Show resolved
Hide resolved
…supports/Channels.java Co-authored-by: Nejc Tomažič <[email protected]>
| // 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); |
There was a problem hiding this comment.
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 ... ;-)
There was a problem hiding this comment.
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); |
There was a problem hiding this comment.
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?
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:
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