Skip to content

Commit

Permalink
Fixed tests, avoid to value to 0 the receiveMaximum default
Browse files Browse the repository at this point in the history
  • Loading branch information
andsel committed Sep 15, 2024
1 parent 92d1ece commit 18d5c0b
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions broker/src/main/java/io/moquette/broker/BrokerConfiguration.java
Original file line number Diff line number Diff line change
Expand Up @@ -69,19 +69,29 @@ class BrokerConfiguration {
receiveMaximum = props.intProp(IConfig.RECEIVE_MAXIMUM, Integer.MAX_VALUE);
}

// test method
public BrokerConfiguration(boolean allowAnonymous, boolean allowZeroByteClientId,
boolean reauthorizeSubscriptionsOnConnect, int bufferFlushMillis) {
this(allowAnonymous, false, allowZeroByteClientId,
reauthorizeSubscriptionsOnConnect, bufferFlushMillis);
}

// test method
public BrokerConfiguration(boolean allowAnonymous, boolean peerCertificateAsUsername, boolean allowZeroByteClientId,
boolean reauthorizeSubscriptionsOnConnect, int bufferFlushMillis) {
this(allowAnonymous, peerCertificateAsUsername, allowZeroByteClientId, reauthorizeSubscriptionsOnConnect,
bufferFlushMillis, BrokerConstants.INFLIGHT_WINDOW_SIZE);
}

// test method
public BrokerConfiguration(boolean allowAnonymous, boolean peerCertificateAsUsername, boolean allowZeroByteClientId,
boolean reauthorizeSubscriptionsOnConnect, int bufferFlushMillis, int receiveMaximum) {
this.allowAnonymous = allowAnonymous;
this.peerCertificateAsUsername = peerCertificateAsUsername;
this.allowZeroByteClientId = allowZeroByteClientId;
this.reauthorizeSubscriptionsOnConnect = reauthorizeSubscriptionsOnConnect;
this.bufferFlushMillis = bufferFlushMillis;
this.receiveMaximum = receiveMaximum;
}

public boolean isAllowAnonymous() {
Expand Down

0 comments on commit 18d5c0b

Please sign in to comment.