lhotari commented on code in PR #22862:
URL: https://github.com/apache/pulsar/pull/22862#discussion_r1630147739
##########
pulsar-broker/src/test/java/org/apache/pulsar/broker/auth/MockedPulsarServiceBaseTest.java:
##########
@@ -237,9 +237,14 @@ protected final void internalSetupForStatsTest() throws
Exception {
protected void doInitConf() throws Exception {
this.conf.setBrokerShutdownTimeoutMs(0L);
this.conf.setLoadBalancerOverrideBrokerNicSpeedGbps(Optional.of(1.0d));
- this.conf.setBrokerServicePort(Optional.of(0));
+ if (!conf.getBrokerServicePort().isPresent()) {
+ this.conf.setBrokerServicePort(Optional.of(0));
+ }
+
this.conf.setAdvertisedAddress("localhost");
- this.conf.setWebServicePort(Optional.of(0));
+ if (!conf.getWebServicePort().isPresent()) {
+ this.conf.setWebServicePort(Optional.of(0));
+ }
Review Comment:
it's better to override `doInitConf` method in a class that needs to
override the defaults. please search for examples in the code base. It wouldn't
be consistent to make this type of conditions only for these settings.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]