This closes #3433
This commit is contained in:
commit
eb273d1073
|
@ -2059,7 +2059,7 @@ public final class FileConfigurationParser extends XMLConfigurationUtil {
|
||||||
// Default bridge conf
|
// Default bridge conf
|
||||||
int confirmationWindowSize = getTextBytesAsIntBytes(brNode, "confirmation-window-size", ActiveMQDefaultConfiguration.getDefaultBridgeConfirmationWindowSize(), Validators.POSITIVE_INT);
|
int confirmationWindowSize = getTextBytesAsIntBytes(brNode, "confirmation-window-size", ActiveMQDefaultConfiguration.getDefaultBridgeConfirmationWindowSize(), Validators.POSITIVE_INT);
|
||||||
|
|
||||||
int producerWindowSize = getTextBytesAsIntBytes(brNode, "producer-window-size", ActiveMQDefaultConfiguration.getDefaultBridgeConfirmationWindowSize(), Validators.POSITIVE_INT);
|
int producerWindowSize = getTextBytesAsIntBytes(brNode, "producer-window-size", ActiveMQDefaultConfiguration.getDefaultBridgeProducerWindowSize(), Validators.POSITIVE_INT);
|
||||||
|
|
||||||
long retryInterval = getLong(brNode, "retry-interval", ActiveMQClient.DEFAULT_RETRY_INTERVAL, Validators.GT_ZERO);
|
long retryInterval = getLong(brNode, "retry-interval", ActiveMQClient.DEFAULT_RETRY_INTERVAL, Validators.GT_ZERO);
|
||||||
|
|
||||||
|
|
|
@ -260,6 +260,33 @@ public class FileConfigurationParserTest extends ActiveMQTestBase {
|
||||||
assertEquals("helloworld", bconfig.getPassword());
|
assertEquals("helloworld", bconfig.getPassword());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testDefaultBridgeProducerWindowSize() throws Exception {
|
||||||
|
FileConfigurationParser parser = new FileConfigurationParser();
|
||||||
|
|
||||||
|
String configStr = firstPart +
|
||||||
|
"<bridges>\n" +
|
||||||
|
" <bridge name=\"my-bridge\">\n" +
|
||||||
|
" <queue-name>sausage-factory</queue-name>\n" +
|
||||||
|
" <forwarding-address>mincing-machine</forwarding-address>\n" +
|
||||||
|
" <static-connectors>\n" +
|
||||||
|
" <connector-ref>remote-connector</connector-ref>\n" +
|
||||||
|
" </static-connectors>\n" +
|
||||||
|
" </bridge>\n" +
|
||||||
|
"</bridges>\n"
|
||||||
|
+ lastPart;
|
||||||
|
ByteArrayInputStream input = new ByteArrayInputStream(configStr.getBytes(StandardCharsets.UTF_8));
|
||||||
|
|
||||||
|
Configuration config = parser.parseMainConfig(input);
|
||||||
|
|
||||||
|
List<BridgeConfiguration> bridgeConfigs = config.getBridgeConfigurations();
|
||||||
|
assertEquals(1, bridgeConfigs.size());
|
||||||
|
|
||||||
|
BridgeConfiguration bconfig = bridgeConfigs.get(0);
|
||||||
|
|
||||||
|
assertEquals(ActiveMQDefaultConfiguration.getDefaultBridgeProducerWindowSize(), bconfig.getProducerWindowSize());
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testParsingOverflowPageSize() throws Exception {
|
public void testParsingOverflowPageSize() throws Exception {
|
||||||
testParsingOverFlow("<address-settings>" + "\n" + "<address-setting match=\"#\">" + "\n" + "<page-size-bytes>2147483648</page-size-bytes>\n" + "</address-setting>" + "\n" + "</address-settings>" + "\n");
|
testParsingOverFlow("<address-settings>" + "\n" + "<address-setting match=\"#\">" + "\n" + "<page-size-bytes>2147483648</page-size-bytes>\n" + "</address-setting>" + "\n" + "</address-settings>" + "\n");
|
||||||
|
|
Loading…
Reference in New Issue