From b390a6b08f056648eb1b3ff810036b4f4f8deb96 Mon Sep 17 00:00:00 2001 From: Gary Tully Date: Mon, 16 May 2022 13:40:12 +0100 Subject: [PATCH] ARTEMIS-3835 - deprecate addressesSettings in place of addressSettings on the Configuration bean --- .../junit/EmbeddedActiveMQResource.java | 2 +- .../artemis/core/config/Configuration.java | 16 +- .../core/config/impl/ConfigurationImpl.java | 48 ++++-- .../impl/FileConfigurationParser.java | 4 +- .../core/server/impl/ActiveMQServerImpl.java | 6 +- .../config/impl/ConfigurationImplTest.java | 22 +-- .../impl/FileConfigurationParserTest.java | 8 +- .../config/impl/FileConfigurationTest.java | 148 +++++++++--------- .../addressConfig/artemisServer.groovy | 5 +- .../exportimport/artemisServer.groovy | 2 +- .../resources/hqsoak/artemisServer.groovy | 5 +- .../oldAddressSpace/artemisServer.groovy | 4 +- .../prefixSendAckTest/artemisServer.groovy | 2 +- .../amqp/AmqpAnonymousRelayTest.java | 4 +- .../amqp/AmqpClientTestSupport.java | 2 +- .../amqp/AmqpSenderRoutingTypeTest.java | 6 +- .../amqp/DLQAfterExpiredMessageTest.java | 4 +- .../amqp/JMSMessageGroupsTest.java | 2 +- .../amqp/QueueAutoCreationTest.java | 2 +- .../amqp/paging/AmqpPagingTest.java | 4 +- .../integration/client/AutoCreateTest.java | 12 +- .../client/ConsumerWindowSizeTest.java | 6 +- .../integration/client/CoreClientTest.java | 2 +- .../client/InfiniteRedeliveryTest.java | 6 +- .../client/MessageConsumerRollbackTest.java | 2 +- .../integration/client/ProducerTest.java | 4 +- .../AutoDeleteDistributedTest.java | 2 +- .../ClusteredMessageCounterTest.java | 2 +- .../TwoWayTwoNodeClusterTest.java | 6 +- .../SharedStoreScaleDownBackupTest.java | 4 +- .../crossprotocol/AMQPToJMSCoreTest.java | 2 +- .../crossprotocol/AMQPToOpenwireTest.java | 2 +- .../crossprotocol/AMQPToStompTest.java | 2 +- .../crossprotocol/OpenWireToAMQPTest.java | 2 +- .../OpenwireAmqpResenderTest.java | 2 +- .../tests/integration/divert/DivertTest.java | 2 +- .../journal/DuplicateRecordIdTest.java | 2 +- .../integration/mqtt/MQTTTestSupport.java | 2 +- .../mqtt/MqttClusterRemoteSubscribeTest.java | 4 +- .../mqtt/MqttClusterWildcardTest.java | 4 +- .../integration/mqtt5/MQTT5TestSupport.java | 2 +- .../LargeMessageQueueAutoCreationTest.java | 2 +- .../openwire/OpenWireTestBase.java | 2 +- ...msDurableQueueWildcardSendReceiveTest.java | 2 +- .../amq/ProducerAutoCreateQueueTest.java | 2 +- .../openwire/amq/ProducerBlockingTtlTest.java | 2 +- .../amq/ProducerFlowControlBaseTest.java | 2 +- .../amq/ProducerFlowControlSendFailTest.java | 2 +- .../paging/AnonymousProducerPageTest.java | 4 +- .../paging/MultipleProducersPagingTest.java | 2 +- .../paging/SpawnedServerSupport.java | 2 +- .../persistence/ConfigChangeTest.java | 4 +- .../plugin/OpenwirePluginTest.java | 2 +- .../integration/routing/ElasticQueueTest.java | 2 +- .../scheduling/ScheduledMessageTest.java | 2 +- .../server/PotentialOOMELoggingTest.java | 2 +- .../server/ScaleDownRemoveSFTest.java | 4 +- .../integration/server/ScaleDownTest.java | 4 +- .../tests/util/JMSClusteredTestBase.java | 2 +- 59 files changed, 223 insertions(+), 189 deletions(-) diff --git a/artemis-junit/src/main/java/org/apache/activemq/artemis/junit/EmbeddedActiveMQResource.java b/artemis-junit/src/main/java/org/apache/activemq/artemis/junit/EmbeddedActiveMQResource.java index 6c038f295c..093dd36409 100644 --- a/artemis-junit/src/main/java/org/apache/activemq/artemis/junit/EmbeddedActiveMQResource.java +++ b/artemis-junit/src/main/java/org/apache/activemq/artemis/junit/EmbeddedActiveMQResource.java @@ -85,7 +85,7 @@ public class EmbeddedActiveMQResource extends ExternalResource { * Create a default EmbeddedActiveMQResource */ public EmbeddedActiveMQResource() { - configuration = new ConfigurationImpl().setName(SERVER_NAME).setPersistenceEnabled(false).setSecurityEnabled(false).addAcceptorConfiguration(new TransportConfiguration(InVMAcceptorFactory.class.getName())).addAddressesSetting("#", new AddressSettings().setDeadLetterAddress(SimpleString.toSimpleString("dla")).setExpiryAddress(SimpleString.toSimpleString("expiry"))); + configuration = new ConfigurationImpl().setName(SERVER_NAME).setPersistenceEnabled(false).setSecurityEnabled(false).addAcceptorConfiguration(new TransportConfiguration(InVMAcceptorFactory.class.getName())).addAddressSetting("#", new AddressSettings().setDeadLetterAddress(SimpleString.toSimpleString("dla")).setExpiryAddress(SimpleString.toSimpleString("expiry"))); init(); } diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/config/Configuration.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/config/Configuration.java index 8addffcfbc..f57cb1a481 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/config/Configuration.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/config/Configuration.java @@ -1088,16 +1088,28 @@ public interface Configuration { /** * @return A list of AddressSettings per matching to be deployed to the address settings repository */ - Map getAddressesSettings(); + Map getAddressSettings(); /** - * @param addressesSettings list of AddressSettings per matching to be deployed to the address + * @param addressSettings list of AddressSettings per matching to be deployed to the address * settings repository */ + Configuration setAddressSettings(Map addressSettings); + + Configuration addAddressSetting(String key, AddressSettings addressesSetting); + + Configuration clearAddressSettings(); + + @Deprecated + Map getAddressesSettings(); + + @Deprecated Configuration setAddressesSettings(Map addressesSettings); + @Deprecated Configuration addAddressesSetting(String key, AddressSettings addressesSetting); + @Deprecated Configuration clearAddressesSettings(); /** diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/config/impl/ConfigurationImpl.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/config/impl/ConfigurationImpl.java index aeb5b829f4..070d230094 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/config/impl/ConfigurationImpl.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/config/impl/ConfigurationImpl.java @@ -299,7 +299,7 @@ public class ConfigurationImpl implements Configuration, Serializable { protected GroupingHandlerConfiguration groupingHandlerConfiguration; - private Map addressesSettings = new HashMap<>(); + private Map addressSettings = new HashMap<>(); private Map resourceLimitSettings = new HashMap<>(); @@ -1646,26 +1646,50 @@ public class ConfigurationImpl implements Configuration, Serializable { } @Override + public Map getAddressSettings() { + return addressSettings; + } + + @Override + public ConfigurationImpl setAddressSettings(final Map addressesSettings) { + this.addressSettings = addressesSettings; + return this; + } + + @Override + public ConfigurationImpl addAddressSetting(String key, AddressSettings addressesSetting) { + this.addressSettings.put(key, addressesSetting); + return this; + } + + @Override + public ConfigurationImpl clearAddressSettings() { + this.addressSettings.clear(); + return this; + } + + @Override + @Deprecated public Map getAddressesSettings() { - return addressesSettings; + return getAddressSettings(); } @Override + @Deprecated public ConfigurationImpl setAddressesSettings(final Map addressesSettings) { - this.addressesSettings = addressesSettings; - return this; + return setAddressSettings(addressesSettings); } @Override + @Deprecated public ConfigurationImpl addAddressesSetting(String key, AddressSettings addressesSetting) { - this.addressesSettings.put(key, addressesSetting); - return this; + return addAddressSetting(key, addressesSetting); } @Override + @Deprecated public ConfigurationImpl clearAddressesSettings() { - this.addressesSettings.clear(); - return this; + return clearAddressSettings(); } @Override @@ -2128,7 +2152,7 @@ public class ConfigurationImpl implements Configuration, Serializable { final int prime = 31; int result = 1; result = prime * result + ((acceptorConfigs == null) ? 0 : acceptorConfigs.hashCode()); - result = prime * result + ((addressesSettings == null) ? 0 : addressesSettings.hashCode()); + result = prime * result + ((addressSettings == null) ? 0 : addressSettings.hashCode()); result = prime * result + (asyncConnectionExecutionEnabled ? 1231 : 1237); result = prime * result + ((bindingsDirectory == null) ? 0 : bindingsDirectory.hashCode()); result = prime * result + ((bridgeConfigurations == null) ? 0 : bridgeConfigurations.hashCode()); @@ -2214,10 +2238,10 @@ public class ConfigurationImpl implements Configuration, Serializable { return false; } else if (!acceptorConfigs.equals(other.acceptorConfigs)) return false; - if (addressesSettings == null) { - if (other.addressesSettings != null) + if (addressSettings == null) { + if (other.addressSettings != null) return false; - } else if (!addressesSettings.equals(other.addressesSettings)) + } else if (!addressSettings.equals(other.addressSettings)) return false; if (asyncConnectionExecutionEnabled != other.asyncConnectionExecutionEnabled) return false; diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/deployers/impl/FileConfigurationParser.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/deployers/impl/FileConfigurationParser.java index 9e839c2f39..ef17e435aa 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/deployers/impl/FileConfigurationParser.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/deployers/impl/FileConfigurationParser.java @@ -1036,11 +1036,11 @@ public final class FileConfigurationParser extends XMLConfigurationUtil { NodeList list = node.getElementsByTagName("address-setting"); for (int i = 0; i < list.getLength(); i++) { Pair newAddressSettings = parseAddressSettings(list.item(i)); - Map addressSettings = config.getAddressesSettings(); + Map addressSettings = config.getAddressSettings(); if (addressSettings.containsKey(newAddressSettings.getA())) { ActiveMQServerLogger.LOGGER.duplicateAddressSettingMatch(newAddressSettings.getA()); } else { - config.getAddressesSettings().put(newAddressSettings.getA(), newAddressSettings.getB()); + config.getAddressSettings().put(newAddressSettings.getA(), newAddressSettings.getB()); } } } diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ActiveMQServerImpl.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ActiveMQServerImpl.java index ff0e10422b..a659e46e61 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ActiveMQServerImpl.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ActiveMQServerImpl.java @@ -3567,7 +3567,7 @@ public class ActiveMQServerImpl implements ActiveMQServer { } private void deployAddressSettingsFromConfiguration() { - for (Map.Entry entry : configuration.getAddressesSettings().entrySet()) { + for (Map.Entry entry : configuration.getAddressSettings().entrySet()) { addressSettingsRepository.addMatch(entry.getKey(), entry.getValue(), true); } } @@ -4344,7 +4344,7 @@ public class ActiveMQServerImpl implements ActiveMQServer { LegacyJMSConfiguration legacyJMSConfiguration = new LegacyJMSConfiguration(config); legacyJMSConfiguration.parseConfiguration(uri.openStream()); configuration.setSecurityRoles(config.getSecurityRoles()); - configuration.setAddressesSettings(config.getAddressesSettings()); + configuration.setAddressSettings(config.getAddressSettings()); configuration.setDivertConfigurations(config.getDivertConfigurations()); configuration.setAddressConfigurations(config.getAddressConfigurations()); configuration.setQueueConfigs(config.getQueueConfigs()); @@ -4390,7 +4390,7 @@ public class ActiveMQServerImpl implements ActiveMQServer { recoverStoredSecuritySettings(); ActiveMQServerLogger.LOGGER.reloadingConfiguration("address settings"); - addressSettingsRepository.swap(configuration.getAddressesSettings().entrySet()); + addressSettingsRepository.swap(configuration.getAddressSettings().entrySet()); recoverStoredAddressSettings(); ActiveMQServerLogger.LOGGER.reloadingConfiguration("diverts"); diff --git a/artemis-server/src/test/java/org/apache/activemq/artemis/core/config/impl/ConfigurationImplTest.java b/artemis-server/src/test/java/org/apache/activemq/artemis/core/config/impl/ConfigurationImplTest.java index 8f7128446d..9811e1a8d3 100644 --- a/artemis-server/src/test/java/org/apache/activemq/artemis/core/config/impl/ConfigurationImplTest.java +++ b/artemis-server/src/test/java/org/apache/activemq/artemis/core/config/impl/ConfigurationImplTest.java @@ -747,16 +747,16 @@ public class ConfigurationImplTest extends ActiveMQTestBase { Properties properties = new Properties(); - properties.put("addressesSettings.#.expiryAddress", "sharedExpiry"); - properties.put("addressesSettings.NeedToTrackExpired.expiryAddress", "important"); - properties.put("addressesSettings.\"Name.With.Dots\".expiryAddress", "moreImportant"); + properties.put("addressesSettings.#.expiryAddress", "sharedExpiry"); // verify @Deprecation double plural still works + properties.put("addressSettings.NeedToTrackExpired.expiryAddress", "important"); + properties.put("addressSettings.\"Name.With.Dots\".expiryAddress", "moreImportant"); configuration.parsePrefixedProperties(properties, null); - Assert.assertEquals(3, configuration.getAddressesSettings().size()); - Assert.assertEquals(SimpleString.toSimpleString("sharedExpiry"), configuration.getAddressesSettings().get("#").getExpiryAddress()); - Assert.assertEquals(SimpleString.toSimpleString("important"), configuration.getAddressesSettings().get("NeedToTrackExpired").getExpiryAddress()); - Assert.assertEquals(SimpleString.toSimpleString("moreImportant"), configuration.getAddressesSettings().get("Name.With.Dots").getExpiryAddress()); + Assert.assertEquals(3, configuration.getAddressSettings().size()); + Assert.assertEquals(SimpleString.toSimpleString("sharedExpiry"), configuration.getAddressSettings().get("#").getExpiryAddress()); + Assert.assertEquals(SimpleString.toSimpleString("important"), configuration.getAddressSettings().get("NeedToTrackExpired").getExpiryAddress()); + Assert.assertEquals(SimpleString.toSimpleString("moreImportant"), configuration.getAddressSettings().get("Name.With.Dots").getExpiryAddress()); } @Test @@ -929,10 +929,10 @@ public class ConfigurationImplTest extends ActiveMQTestBase { configuration.parsePrefixedProperties(properties, null); - Assert.assertEquals(3, configuration.getAddressesSettings().size()); - Assert.assertEquals(SimpleString.toSimpleString("sharedExpiry"), configuration.getAddressesSettings().get("#").getExpiryAddress()); - Assert.assertEquals(SimpleString.toSimpleString("important"), configuration.getAddressesSettings().get("NeedToTrackExpired").getExpiryAddress()); - Assert.assertEquals(SimpleString.toSimpleString("moreImportant"), configuration.getAddressesSettings().get("Name.With.Dots").getExpiryAddress()); + Assert.assertEquals(3, configuration.getAddressSettings().size()); + Assert.assertEquals(SimpleString.toSimpleString("sharedExpiry"), configuration.getAddressSettings().get("#").getExpiryAddress()); + Assert.assertEquals(SimpleString.toSimpleString("important"), configuration.getAddressSettings().get("NeedToTrackExpired").getExpiryAddress()); + Assert.assertEquals(SimpleString.toSimpleString("moreImportant"), configuration.getAddressSettings().get("Name.With.Dots").getExpiryAddress()); } /** diff --git a/artemis-server/src/test/java/org/apache/activemq/artemis/core/config/impl/FileConfigurationParserTest.java b/artemis-server/src/test/java/org/apache/activemq/artemis/core/config/impl/FileConfigurationParserTest.java index 9cad4d7788..dfa0dbd369 100644 --- a/artemis-server/src/test/java/org/apache/activemq/artemis/core/config/impl/FileConfigurationParserTest.java +++ b/artemis-server/src/test/java/org/apache/activemq/artemis/core/config/impl/FileConfigurationParserTest.java @@ -101,7 +101,7 @@ public class FileConfigurationParserTest extends ActiveMQTestBase { FileConfigurationParser parser = new FileConfigurationParser(); Configuration config = parser.parseMainConfig(ClassloadingUtil.findResource("FileConfigurationParser-duplicateAddressSettings.xml").openStream()); - Assert.assertEquals(123, config.getAddressesSettings().get("foo").getRedistributionDelay()); + Assert.assertEquals(123, config.getAddressSettings().get("foo").getRedistributionDelay()); } @Test @@ -365,7 +365,7 @@ public class FileConfigurationParserTest extends ActiveMQTestBase { ByteArrayInputStream input = new ByteArrayInputStream(configStr.getBytes(StandardCharsets.UTF_8)); Configuration configuration = parser.parseMainConfig(input); - AddressSettings settings = configuration.getAddressesSettings().get("foo"); + AddressSettings settings = configuration.getAddressSettings().get("foo"); Assert.assertEquals(123, settings.getMaxSizeMessages()); } @@ -414,8 +414,8 @@ public class FileConfigurationParserTest extends ActiveMQTestBase { + "\n") + lastPart; ByteArrayInputStream input = new ByteArrayInputStream(configStr.getBytes(StandardCharsets.UTF_8)); Configuration configuration = new FileConfigurationParser().parseMainConfig(input); - assertEquals(1, configuration.getAddressesSettings().size()); - AddressSettings addressSettings = configuration.getAddressesSettings().get("#"); + assertEquals(1, configuration.getAddressSettings().size()); + AddressSettings addressSettings = configuration.getAddressSettings().get("#"); assertEquals(expected, addressSettings.getMaxSizeBytesRejectThreshold()); } diff --git a/artemis-server/src/test/java/org/apache/activemq/artemis/core/config/impl/FileConfigurationTest.java b/artemis-server/src/test/java/org/apache/activemq/artemis/core/config/impl/FileConfigurationTest.java index b59b271b8b..b9a7d1ddff 100644 --- a/artemis-server/src/test/java/org/apache/activemq/artemis/core/config/impl/FileConfigurationTest.java +++ b/artemis-server/src/test/java/org/apache/activemq/artemis/core/config/impl/FileConfigurationTest.java @@ -402,83 +402,83 @@ public class FileConfigurationTest extends ConfigurationImplTest { } } - assertEquals(2, conf.getAddressesSettings().size()); + assertEquals(2, conf.getAddressSettings().size()); - assertTrue(conf.getAddressesSettings().get("a1") != null); - assertTrue(conf.getAddressesSettings().get("a2") != null); + assertTrue(conf.getAddressSettings().get("a1") != null); + assertTrue(conf.getAddressSettings().get("a2") != null); - assertEquals("a1.1", conf.getAddressesSettings().get("a1").getDeadLetterAddress().toString()); - assertEquals(AddressSettings.DEFAULT_AUTO_CREATE_DEAD_LETTER_RESOURCES, conf.getAddressesSettings().get("a1").isAutoCreateDeadLetterResources()); - assertEquals(AddressSettings.DEFAULT_DEAD_LETTER_QUEUE_PREFIX, conf.getAddressesSettings().get("a1").getDeadLetterQueuePrefix()); - assertEquals(AddressSettings.DEFAULT_DEAD_LETTER_QUEUE_SUFFIX, conf.getAddressesSettings().get("a1").getDeadLetterQueueSuffix()); - assertEquals("a1.2", conf.getAddressesSettings().get("a1").getExpiryAddress().toString()); - assertEquals(1L, (long) conf.getAddressesSettings().get("a1").getExpiryDelay()); - assertEquals(2L, (long) conf.getAddressesSettings().get("a1").getMinExpiryDelay()); - assertEquals(3L, (long) conf.getAddressesSettings().get("a1").getMaxExpiryDelay()); - assertEquals(AddressSettings.DEFAULT_AUTO_CREATE_EXPIRY_RESOURCES, conf.getAddressesSettings().get("a1").isAutoCreateExpiryResources()); - assertEquals(AddressSettings.DEFAULT_EXPIRY_QUEUE_PREFIX, conf.getAddressesSettings().get("a1").getExpiryQueuePrefix()); - assertEquals(AddressSettings.DEFAULT_EXPIRY_QUEUE_SUFFIX, conf.getAddressesSettings().get("a1").getExpiryQueueSuffix()); - assertEquals(1, conf.getAddressesSettings().get("a1").getRedeliveryDelay()); - assertEquals(0.5, conf.getAddressesSettings().get("a1").getRedeliveryCollisionAvoidanceFactor(), 0); - assertEquals(856686592L, conf.getAddressesSettings().get("a1").getMaxSizeBytes()); - assertEquals(817381738L, conf.getAddressesSettings().get("a1").getPageSizeBytes()); - assertEquals(10, conf.getAddressesSettings().get("a1").getPageCacheMaxSize()); - assertEquals(4, conf.getAddressesSettings().get("a1").getMessageCounterHistoryDayLimit()); - assertEquals(10, conf.getAddressesSettings().get("a1").getSlowConsumerThreshold()); - assertEquals(SlowConsumerThresholdMeasurementUnit.MESSAGES_PER_HOUR, conf.getAddressesSettings().get("a1").getSlowConsumerThresholdMeasurementUnit()); - assertEquals(5, conf.getAddressesSettings().get("a1").getSlowConsumerCheckPeriod()); - assertEquals(SlowConsumerPolicy.NOTIFY, conf.getAddressesSettings().get("a1").getSlowConsumerPolicy()); - assertEquals(true, conf.getAddressesSettings().get("a1").isAutoCreateJmsQueues()); - assertEquals(true, conf.getAddressesSettings().get("a1").isAutoDeleteJmsQueues()); - assertEquals(true, conf.getAddressesSettings().get("a1").isAutoCreateJmsTopics()); - assertEquals(true, conf.getAddressesSettings().get("a1").isAutoDeleteJmsTopics()); - assertEquals(0, conf.getAddressesSettings().get("a1").getAutoDeleteQueuesDelay()); - assertEquals(0, conf.getAddressesSettings().get("a1").getAutoDeleteAddressesDelay()); - assertEquals(false, conf.getAddressesSettings().get("a1").isDefaultPurgeOnNoConsumers()); - assertEquals(5, conf.getAddressesSettings().get("a1").getDefaultMaxConsumers()); - assertEquals(RoutingType.ANYCAST, conf.getAddressesSettings().get("a1").getDefaultQueueRoutingType()); - assertEquals(RoutingType.MULTICAST, conf.getAddressesSettings().get("a1").getDefaultAddressRoutingType()); - assertEquals(3, conf.getAddressesSettings().get("a1").getDefaultRingSize()); - assertEquals(0, conf.getAddressesSettings().get("a1").getRetroactiveMessageCount()); - assertTrue(conf.getAddressesSettings().get("a1").isEnableMetrics()); - assertTrue(conf.getAddressesSettings().get("a1").isEnableIngressTimestamp()); + assertEquals("a1.1", conf.getAddressSettings().get("a1").getDeadLetterAddress().toString()); + assertEquals(AddressSettings.DEFAULT_AUTO_CREATE_DEAD_LETTER_RESOURCES, conf.getAddressSettings().get("a1").isAutoCreateDeadLetterResources()); + assertEquals(AddressSettings.DEFAULT_DEAD_LETTER_QUEUE_PREFIX, conf.getAddressSettings().get("a1").getDeadLetterQueuePrefix()); + assertEquals(AddressSettings.DEFAULT_DEAD_LETTER_QUEUE_SUFFIX, conf.getAddressSettings().get("a1").getDeadLetterQueueSuffix()); + assertEquals("a1.2", conf.getAddressSettings().get("a1").getExpiryAddress().toString()); + assertEquals(1L, (long) conf.getAddressSettings().get("a1").getExpiryDelay()); + assertEquals(2L, (long) conf.getAddressSettings().get("a1").getMinExpiryDelay()); + assertEquals(3L, (long) conf.getAddressSettings().get("a1").getMaxExpiryDelay()); + assertEquals(AddressSettings.DEFAULT_AUTO_CREATE_EXPIRY_RESOURCES, conf.getAddressSettings().get("a1").isAutoCreateExpiryResources()); + assertEquals(AddressSettings.DEFAULT_EXPIRY_QUEUE_PREFIX, conf.getAddressSettings().get("a1").getExpiryQueuePrefix()); + assertEquals(AddressSettings.DEFAULT_EXPIRY_QUEUE_SUFFIX, conf.getAddressSettings().get("a1").getExpiryQueueSuffix()); + assertEquals(1, conf.getAddressSettings().get("a1").getRedeliveryDelay()); + assertEquals(0.5, conf.getAddressSettings().get("a1").getRedeliveryCollisionAvoidanceFactor(), 0); + assertEquals(856686592L, conf.getAddressSettings().get("a1").getMaxSizeBytes()); + assertEquals(817381738L, conf.getAddressSettings().get("a1").getPageSizeBytes()); + assertEquals(10, conf.getAddressSettings().get("a1").getPageCacheMaxSize()); + assertEquals(4, conf.getAddressSettings().get("a1").getMessageCounterHistoryDayLimit()); + assertEquals(10, conf.getAddressSettings().get("a1").getSlowConsumerThreshold()); + assertEquals(SlowConsumerThresholdMeasurementUnit.MESSAGES_PER_HOUR, conf.getAddressSettings().get("a1").getSlowConsumerThresholdMeasurementUnit()); + assertEquals(5, conf.getAddressSettings().get("a1").getSlowConsumerCheckPeriod()); + assertEquals(SlowConsumerPolicy.NOTIFY, conf.getAddressSettings().get("a1").getSlowConsumerPolicy()); + assertEquals(true, conf.getAddressSettings().get("a1").isAutoCreateJmsQueues()); + assertEquals(true, conf.getAddressSettings().get("a1").isAutoDeleteJmsQueues()); + assertEquals(true, conf.getAddressSettings().get("a1").isAutoCreateJmsTopics()); + assertEquals(true, conf.getAddressSettings().get("a1").isAutoDeleteJmsTopics()); + assertEquals(0, conf.getAddressSettings().get("a1").getAutoDeleteQueuesDelay()); + assertEquals(0, conf.getAddressSettings().get("a1").getAutoDeleteAddressesDelay()); + assertEquals(false, conf.getAddressSettings().get("a1").isDefaultPurgeOnNoConsumers()); + assertEquals(5, conf.getAddressSettings().get("a1").getDefaultMaxConsumers()); + assertEquals(RoutingType.ANYCAST, conf.getAddressSettings().get("a1").getDefaultQueueRoutingType()); + assertEquals(RoutingType.MULTICAST, conf.getAddressSettings().get("a1").getDefaultAddressRoutingType()); + assertEquals(3, conf.getAddressSettings().get("a1").getDefaultRingSize()); + assertEquals(0, conf.getAddressSettings().get("a1").getRetroactiveMessageCount()); + assertTrue(conf.getAddressSettings().get("a1").isEnableMetrics()); + assertTrue(conf.getAddressSettings().get("a1").isEnableIngressTimestamp()); - assertEquals("a2.1", conf.getAddressesSettings().get("a2").getDeadLetterAddress().toString()); - assertEquals(true, conf.getAddressesSettings().get("a2").isAutoCreateDeadLetterResources()); - assertEquals("", conf.getAddressesSettings().get("a2").getDeadLetterQueuePrefix().toString()); - assertEquals(".DLQ", conf.getAddressesSettings().get("a2").getDeadLetterQueueSuffix().toString()); - assertEquals("a2.2", conf.getAddressesSettings().get("a2").getExpiryAddress().toString()); - assertEquals(-1L, (long) conf.getAddressesSettings().get("a2").getExpiryDelay()); - assertEquals(-1L, (long) conf.getAddressesSettings().get("a2").getMinExpiryDelay()); - assertEquals(-1L, (long) conf.getAddressesSettings().get("a2").getMaxExpiryDelay()); - assertEquals(true, conf.getAddressesSettings().get("a2").isAutoCreateDeadLetterResources()); - assertEquals("", conf.getAddressesSettings().get("a2").getExpiryQueuePrefix().toString()); - assertEquals(".EXP", conf.getAddressesSettings().get("a2").getExpiryQueueSuffix().toString()); - assertEquals(5, conf.getAddressesSettings().get("a2").getRedeliveryDelay()); - assertEquals(0.0, conf.getAddressesSettings().get("a2").getRedeliveryCollisionAvoidanceFactor(), 0); - assertEquals(932489234928324L, conf.getAddressesSettings().get("a2").getMaxSizeBytes()); - assertEquals(712671626L, conf.getAddressesSettings().get("a2").getPageSizeBytes()); - assertEquals(20, conf.getAddressesSettings().get("a2").getPageCacheMaxSize()); - assertEquals(8, conf.getAddressesSettings().get("a2").getMessageCounterHistoryDayLimit()); - assertEquals(20, conf.getAddressesSettings().get("a2").getSlowConsumerThreshold()); - assertEquals(SlowConsumerThresholdMeasurementUnit.MESSAGES_PER_DAY, conf.getAddressesSettings().get("a2").getSlowConsumerThresholdMeasurementUnit()); - assertEquals(15, conf.getAddressesSettings().get("a2").getSlowConsumerCheckPeriod()); - assertEquals(SlowConsumerPolicy.KILL, conf.getAddressesSettings().get("a2").getSlowConsumerPolicy()); - assertEquals(false, conf.getAddressesSettings().get("a2").isAutoCreateJmsQueues()); - assertEquals(false, conf.getAddressesSettings().get("a2").isAutoDeleteJmsQueues()); - assertEquals(false, conf.getAddressesSettings().get("a2").isAutoCreateJmsTopics()); - assertEquals(false, conf.getAddressesSettings().get("a2").isAutoDeleteJmsTopics()); - assertEquals(500, conf.getAddressesSettings().get("a2").getAutoDeleteQueuesDelay()); - assertEquals(1000, conf.getAddressesSettings().get("a2").getAutoDeleteAddressesDelay()); - assertEquals(true, conf.getAddressesSettings().get("a2").isDefaultPurgeOnNoConsumers()); - assertEquals(15, conf.getAddressesSettings().get("a2").getDefaultMaxConsumers()); - assertEquals(RoutingType.MULTICAST, conf.getAddressesSettings().get("a2").getDefaultQueueRoutingType()); - assertEquals(RoutingType.ANYCAST, conf.getAddressesSettings().get("a2").getDefaultAddressRoutingType()); - assertEquals(10000, conf.getAddressesSettings().get("a2").getDefaultConsumerWindowSize()); - assertEquals(-1, conf.getAddressesSettings().get("a2").getDefaultRingSize()); - assertEquals(10, conf.getAddressesSettings().get("a2").getRetroactiveMessageCount()); - assertFalse(conf.getAddressesSettings().get("a2").isEnableMetrics()); - assertFalse(conf.getAddressesSettings().get("a2").isEnableIngressTimestamp()); + assertEquals("a2.1", conf.getAddressSettings().get("a2").getDeadLetterAddress().toString()); + assertEquals(true, conf.getAddressSettings().get("a2").isAutoCreateDeadLetterResources()); + assertEquals("", conf.getAddressSettings().get("a2").getDeadLetterQueuePrefix().toString()); + assertEquals(".DLQ", conf.getAddressSettings().get("a2").getDeadLetterQueueSuffix().toString()); + assertEquals("a2.2", conf.getAddressSettings().get("a2").getExpiryAddress().toString()); + assertEquals(-1L, (long) conf.getAddressSettings().get("a2").getExpiryDelay()); + assertEquals(-1L, (long) conf.getAddressSettings().get("a2").getMinExpiryDelay()); + assertEquals(-1L, (long) conf.getAddressSettings().get("a2").getMaxExpiryDelay()); + assertEquals(true, conf.getAddressSettings().get("a2").isAutoCreateDeadLetterResources()); + assertEquals("", conf.getAddressSettings().get("a2").getExpiryQueuePrefix().toString()); + assertEquals(".EXP", conf.getAddressSettings().get("a2").getExpiryQueueSuffix().toString()); + assertEquals(5, conf.getAddressSettings().get("a2").getRedeliveryDelay()); + assertEquals(0.0, conf.getAddressSettings().get("a2").getRedeliveryCollisionAvoidanceFactor(), 0); + assertEquals(932489234928324L, conf.getAddressSettings().get("a2").getMaxSizeBytes()); + assertEquals(712671626L, conf.getAddressSettings().get("a2").getPageSizeBytes()); + assertEquals(20, conf.getAddressSettings().get("a2").getPageCacheMaxSize()); + assertEquals(8, conf.getAddressSettings().get("a2").getMessageCounterHistoryDayLimit()); + assertEquals(20, conf.getAddressSettings().get("a2").getSlowConsumerThreshold()); + assertEquals(SlowConsumerThresholdMeasurementUnit.MESSAGES_PER_DAY, conf.getAddressSettings().get("a2").getSlowConsumerThresholdMeasurementUnit()); + assertEquals(15, conf.getAddressSettings().get("a2").getSlowConsumerCheckPeriod()); + assertEquals(SlowConsumerPolicy.KILL, conf.getAddressSettings().get("a2").getSlowConsumerPolicy()); + assertEquals(false, conf.getAddressSettings().get("a2").isAutoCreateJmsQueues()); + assertEquals(false, conf.getAddressSettings().get("a2").isAutoDeleteJmsQueues()); + assertEquals(false, conf.getAddressSettings().get("a2").isAutoCreateJmsTopics()); + assertEquals(false, conf.getAddressSettings().get("a2").isAutoDeleteJmsTopics()); + assertEquals(500, conf.getAddressSettings().get("a2").getAutoDeleteQueuesDelay()); + assertEquals(1000, conf.getAddressSettings().get("a2").getAutoDeleteAddressesDelay()); + assertEquals(true, conf.getAddressSettings().get("a2").isDefaultPurgeOnNoConsumers()); + assertEquals(15, conf.getAddressSettings().get("a2").getDefaultMaxConsumers()); + assertEquals(RoutingType.MULTICAST, conf.getAddressSettings().get("a2").getDefaultQueueRoutingType()); + assertEquals(RoutingType.ANYCAST, conf.getAddressSettings().get("a2").getDefaultAddressRoutingType()); + assertEquals(10000, conf.getAddressSettings().get("a2").getDefaultConsumerWindowSize()); + assertEquals(-1, conf.getAddressSettings().get("a2").getDefaultRingSize()); + assertEquals(10, conf.getAddressSettings().get("a2").getRetroactiveMessageCount()); + assertFalse(conf.getAddressSettings().get("a2").isEnableMetrics()); + assertFalse(conf.getAddressSettings().get("a2").isEnableIngressTimestamp()); assertTrue(conf.getResourceLimitSettings().containsKey("myUser")); assertEquals(104, conf.getResourceLimitSettings().get("myUser").getMaxConnections()); diff --git a/tests/compatibility-tests/src/main/resources/addressConfig/artemisServer.groovy b/tests/compatibility-tests/src/main/resources/addressConfig/artemisServer.groovy index 8221de75bb..4d9c193a83 100644 --- a/tests/compatibility-tests/src/main/resources/addressConfig/artemisServer.groovy +++ b/tests/compatibility-tests/src/main/resources/addressConfig/artemisServer.groovy @@ -24,7 +24,6 @@ import org.apache.activemq.artemis.core.settings.impl.AddressFullMessagePolicy; import org.apache.activemq.artemis.core.settings.impl.AddressSettings; import org.apache.activemq.artemis.jms.server.config.impl.JMSConfigurationImpl; import org.apache.activemq.artemis.jms.server.embedded.EmbeddedJMS -import org.apache.activemq.artemis.tests.compatibility.GroovyRun; String folder = arg[0]; @@ -36,9 +35,9 @@ configuration.setBrokerInstance(new File(folder + "/" + id)); configuration.addAcceptorConfiguration("artemis", "tcp://0.0.0.0:61616?anycastPrefix=jms.queue.&multicastPrefix=jms.topic."); configuration.setSecurityEnabled(false); configuration.setPersistenceEnabled(false); -configuration.addAddressesSetting("myQueue", new AddressSettings().setAddressFullMessagePolicy(AddressFullMessagePolicy.PAGE).setMaxSizeBytes(1024 * 1024 * 1024).setPageSizeBytes(1024)); +configuration.addAddressSetting("myQueue", new AddressSettings().setAddressFullMessagePolicy(AddressFullMessagePolicy.PAGE).setMaxSizeBytes(1024 * 1024 * 1024).setPageSizeBytes(1024)); // if the client is using the wrong address, it will wrongly block -configuration.addAddressesSetting("#", new AddressSettings().setAddressFullMessagePolicy(AddressFullMessagePolicy.BLOCK).setMaxSizeBytes(10 * 1024).setPageSizeBytes(1024)); +configuration.addAddressSetting("#", new AddressSettings().setAddressFullMessagePolicy(AddressFullMessagePolicy.BLOCK).setMaxSizeBytes(10 * 1024).setPageSizeBytes(1024)); jmsConfiguration = new JMSConfigurationImpl(); // used here even though it's deprecated to be compatible with older versions of the broker diff --git a/tests/compatibility-tests/src/main/resources/exportimport/artemisServer.groovy b/tests/compatibility-tests/src/main/resources/exportimport/artemisServer.groovy index 0064493c5f..751fa996a6 100644 --- a/tests/compatibility-tests/src/main/resources/exportimport/artemisServer.groovy +++ b/tests/compatibility-tests/src/main/resources/exportimport/artemisServer.groovy @@ -39,7 +39,7 @@ configuration.setSecurityEnabled(false); configuration.setPersistenceEnabled(persistent); try { if (!type.startsWith("ARTEMIS-1")) { - configuration.addAddressesSetting("#", new AddressSettings().setAutoCreateAddresses(true)); + configuration.addAddressSetting("#", new AddressSettings().setAutoCreateAddresses(true)); } } catch (Throwable e) { // need to ignore this for 1.4 diff --git a/tests/compatibility-tests/src/main/resources/hqsoak/artemisServer.groovy b/tests/compatibility-tests/src/main/resources/hqsoak/artemisServer.groovy index e51a9d0896..65b56051f4 100644 --- a/tests/compatibility-tests/src/main/resources/hqsoak/artemisServer.groovy +++ b/tests/compatibility-tests/src/main/resources/hqsoak/artemisServer.groovy @@ -3,7 +3,6 @@ package servers import org.apache.activemq.artemis.api.core.RoutingType import org.apache.activemq.artemis.api.core.SimpleString import org.apache.activemq.artemis.core.config.impl.ConfigurationImpl -import org.apache.activemq.artemis.core.postoffice.impl.AddressImpl /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -45,10 +44,10 @@ configuration.setSecurityEnabled(false); configuration.setPersistenceEnabled(true); try { if (!type.startsWith("ARTEMIS-1")) { - configuration.addAddressesSetting("#", new AddressSettings().setAutoCreateAddresses(false).setDeadLetterAddress(SimpleString.toSimpleString("DLQ")) + configuration.addAddressSetting("#", new AddressSettings().setAutoCreateAddresses(false).setDeadLetterAddress(SimpleString.toSimpleString("DLQ")) .setExpiryAddress(SimpleString.toSimpleString("EXP"))); if (globalMaxSize != null) { - configuration.getAddressesSettings().get("#").setPageSizeBytes(Long.parseLong(globalMaxSize)).setAddressFullMessagePolicy(AddressFullMessagePolicy.PAGE) + configuration.getAddressSettings().get("#").setPageSizeBytes(Long.parseLong(globalMaxSize)).setAddressFullMessagePolicy(AddressFullMessagePolicy.PAGE) configuration.setGlobalMaxSize(Long.parseLong(globalMaxSize)); } } diff --git a/tests/compatibility-tests/src/main/resources/oldAddressSpace/artemisServer.groovy b/tests/compatibility-tests/src/main/resources/oldAddressSpace/artemisServer.groovy index 40bacca270..b398546639 100644 --- a/tests/compatibility-tests/src/main/resources/oldAddressSpace/artemisServer.groovy +++ b/tests/compatibility-tests/src/main/resources/oldAddressSpace/artemisServer.groovy @@ -55,7 +55,7 @@ if (!(type.startsWith("ARTEMIS-1") || type.startsWith("HORNETQ"))) { addressSettings.setAutoCreateAddresses(false); addressSettings.setAutoCreateQueues(false); } -configuration.addAddressesSetting("#", addressSettings); +configuration.addAddressSetting("#", addressSettings); addressSettings = new AddressSettings(); addressSettings.setAddressFullMessagePolicy(AddressFullMessagePolicy.PAGE) @@ -68,7 +68,7 @@ if (!(type.startsWith("ARTEMIS-1") || type.startsWith("HORNETQ"))) { addressSettings.setAutoCreateAddresses(false); addressSettings.setAutoCreateQueues(false); } -configuration.addAddressesSetting("jms.#", addressSettings); +configuration.addAddressSetting("jms.#", addressSettings); // if the client is using the wrong address, it will wrongly block diff --git a/tests/compatibility-tests/src/main/resources/prefixSendAckTest/artemisServer.groovy b/tests/compatibility-tests/src/main/resources/prefixSendAckTest/artemisServer.groovy index 5c456a83cd..18c95a7fb9 100644 --- a/tests/compatibility-tests/src/main/resources/prefixSendAckTest/artemisServer.groovy +++ b/tests/compatibility-tests/src/main/resources/prefixSendAckTest/artemisServer.groovy @@ -39,7 +39,7 @@ configuration.setSecurityEnabled(false); configuration.setPersistenceEnabled(persistent); try { if (!type.startsWith("ARTEMIS-1")) { - configuration.addAddressesSetting("#", new AddressSettings().setAutoCreateAddresses(true)); + configuration.addAddressSetting("#", new AddressSettings().setAutoCreateAddresses(true)); } } catch (Throwable e) { // need to ignore this for 1.4 diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/AmqpAnonymousRelayTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/AmqpAnonymousRelayTest.java index 98938d7052..e0c6b1e515 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/AmqpAnonymousRelayTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/AmqpAnonymousRelayTest.java @@ -59,7 +59,7 @@ public class AmqpAnonymousRelayTest extends AmqpClientTestSupport { autoCreateQueueAddressSettings.setDefaultAddressRoutingType(RoutingType.ANYCAST); autoCreateQueueAddressSettings.setDefaultQueueRoutingType(RoutingType.ANYCAST); - server.getConfiguration().getAddressesSettings().put(AUTO_CREATION_QUEUE_PREFIX + "#", autoCreateQueueAddressSettings); + server.getConfiguration().getAddressSettings().put(AUTO_CREATION_QUEUE_PREFIX + "#", autoCreateQueueAddressSettings); AddressSettings autoCreateTopicAddressSettings = new AddressSettings(); autoCreateTopicAddressSettings.setAutoCreateQueues(true); @@ -67,7 +67,7 @@ public class AmqpAnonymousRelayTest extends AmqpClientTestSupport { autoCreateTopicAddressSettings.setDefaultAddressRoutingType(RoutingType.MULTICAST); autoCreateTopicAddressSettings.setDefaultQueueRoutingType(RoutingType.MULTICAST); - server.getConfiguration().getAddressesSettings().put(AUTO_CREATION_TOPIC_PREFIX + "#", autoCreateTopicAddressSettings); + server.getConfiguration().getAddressSettings().put(AUTO_CREATION_TOPIC_PREFIX + "#", autoCreateTopicAddressSettings); } @Test(timeout = 60000) diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/AmqpClientTestSupport.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/AmqpClientTestSupport.java index d7074ecbc9..b1ecbcb037 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/AmqpClientTestSupport.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/AmqpClientTestSupport.java @@ -243,7 +243,7 @@ public class AmqpClientTestSupport extends AmqpTestSupport { addressSettings.setDeadLetterAddress(SimpleString.toSimpleString(getDeadLetterAddress())); addressSettings.setExpiryAddress(SimpleString.toSimpleString(getDeadLetterAddress())); - server.getConfiguration().getAddressesSettings().put("#", addressSettings); + server.getConfiguration().getAddressSettings().put("#", addressSettings); Set acceptors = server.getConfiguration().getAcceptorConfigurations(); for (TransportConfiguration tc : acceptors) { if (tc.getName().equals(NETTY_ACCEPTOR)) { diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/AmqpSenderRoutingTypeTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/AmqpSenderRoutingTypeTest.java index 0d467981ed..c8bc55d4d8 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/AmqpSenderRoutingTypeTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/AmqpSenderRoutingTypeTest.java @@ -42,7 +42,7 @@ public class AmqpSenderRoutingTypeTest extends JMSClientTestSupport { protected void configureAddressPolicy(ActiveMQServer server) { Configuration serverConfig = server.getConfiguration(); serverConfig.setJournalType(JournalType.NIO); - Map map = serverConfig.getAddressesSettings(); + Map map = serverConfig.getAddressSettings(); if (map.size() == 0) { AddressSettings as = new AddressSettings(); as.setDefaultAddressRoutingType(RoutingType.ANYCAST); @@ -57,7 +57,7 @@ public class AmqpSenderRoutingTypeTest extends JMSClientTestSupport { @Test public void testAMQPSenderHonourRoutingTypeOfExistingAddress() throws Exception { - RoutingType routingType = server.getConfiguration().getAddressesSettings().get("#").getDefaultAddressRoutingType(); + RoutingType routingType = server.getConfiguration().getAddressSettings().get("#").getDefaultAddressRoutingType(); Assert.assertEquals(RoutingType.ANYCAST, routingType); try (ActiveMQConnection coreConnection = (ActiveMQConnection) createCoreConnection(); ClientSession clientSession = coreConnection.getSessionFactory().createSession()) { @@ -86,7 +86,7 @@ public class AmqpSenderRoutingTypeTest extends JMSClientTestSupport { @Test public void testAMQPSenderCreateQueueWithDefaultRoutingTypeIfAddressDoNotExist() throws Exception { - RoutingType defaultRoutingType = server.getConfiguration().getAddressesSettings().get("#").getDefaultAddressRoutingType(); + RoutingType defaultRoutingType = server.getConfiguration().getAddressSettings().get("#").getDefaultAddressRoutingType(); Assert.assertEquals(RoutingType.ANYCAST, defaultRoutingType); try (ActiveMQConnection coreConnection = (ActiveMQConnection) createCoreConnection(); ClientSession clientSession = coreConnection.getSessionFactory().createSession()) { diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/DLQAfterExpiredMessageTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/DLQAfterExpiredMessageTest.java index 09446eb81f..7b0f77413a 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/DLQAfterExpiredMessageTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/DLQAfterExpiredMessageTest.java @@ -89,8 +89,8 @@ public class DLQAfterExpiredMessageTest extends AmqpClientTestSupport { addressSettings.setDeadLetterAddress(SimpleString.toSimpleString(getDeadLetterAddress())); addressSettings.setExpiryAddress(SimpleString.toSimpleString(getExpiryQueue())); addressSettings.setMaxDeliveryAttempts(1); - server.getConfiguration().getAddressesSettings().put("#", addressSettings); - server.getConfiguration().getAddressesSettings().put(getExpiryQueue(), addressSettings); + server.getConfiguration().getAddressSettings().put("#", addressSettings); + server.getConfiguration().getAddressSettings().put(getExpiryQueue(), addressSettings); } @Test diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/JMSMessageGroupsTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/JMSMessageGroupsTest.java index 5f7d22e4ea..76e6f3d21e 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/JMSMessageGroupsTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/JMSMessageGroupsTest.java @@ -71,7 +71,7 @@ public class JMSMessageGroupsTest extends JMSClientTestSupport { addressSettings.setDefaultGroupFirstKey(SimpleString.toSimpleString("JMSXFirstInGroupID")); - server.getConfiguration().getAddressesSettings().put("GroupFirst.#", addressSettings); + server.getConfiguration().getAddressSettings().put("GroupFirst.#", addressSettings); } @Test(timeout = 60000) diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/QueueAutoCreationTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/QueueAutoCreationTest.java index c1c11c4476..3e0fa20a54 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/QueueAutoCreationTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/QueueAutoCreationTest.java @@ -82,7 +82,7 @@ public class QueueAutoCreationTest extends JMSClientTestSupport { protected void configureAddressPolicy(ActiveMQServer server) { Configuration serverConfig = server.getConfiguration(); serverConfig.setJournalType(JournalType.NIO); - Map map = serverConfig.getAddressesSettings(); + Map map = serverConfig.getAddressSettings(); if (map.size() == 0) { AddressSettings as = new AddressSettings(); map.put("#", as); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/paging/AmqpPagingTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/paging/AmqpPagingTest.java index 6360b6dce3..423a6635ae 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/paging/AmqpPagingTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/paging/AmqpPagingTest.java @@ -64,7 +64,7 @@ public class AmqpPagingTest extends AmqpClientTestSupport { super.addConfiguration(server); final Map addressesSettings = server.getConfiguration() .setReadWholePage(readWholePage) - .getAddressesSettings(); + .getAddressSettings(); addressesSettings.get("#") .setMaxSizeBytes(100000) .setPageSizeBytes(10000); @@ -104,7 +104,7 @@ public class AmqpPagingTest extends AmqpClientTestSupport { Wait.assertEquals(MSG_COUNT, queueView::getMessageCount); PagingStore pagingStore = server.getPagingManager().getPageStore(SimpleString.toSimpleString(getQueueName())); Assert.assertTrue(pagingStore.isPaging()); - final int pageCacheMaxSize = server.getConfiguration().getAddressesSettings().get("#").getPageCacheMaxSize(); + final int pageCacheMaxSize = server.getConfiguration().getAddressSettings().get("#").getPageCacheMaxSize(); Assert.assertThat("the size of the messages or the number of messages isn't enough", pagingStore.getNumberOfPages(), Matchers.greaterThan(pageCacheMaxSize)); receiver.flow(MSG_COUNT); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/AutoCreateTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/AutoCreateTest.java index 9a7db67861..20cccfe08b 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/AutoCreateTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/AutoCreateTest.java @@ -71,8 +71,8 @@ public class AutoCreateTest extends ActiveMQTestBase { server = createServer(true, true); AddressSettings settings = new AddressSettings().setAutoCreateAddresses(true).setAutoDeleteAddresses(true).setAutoCreateQueues(true).setAutoDeleteQueues(true); - server.getConfiguration().getAddressesSettings().clear(); - server.getConfiguration().getAddressesSettings().put("#", settings); + server.getConfiguration().getAddressSettings().clear(); + server.getConfiguration().getAddressSettings().put("#", settings); } @Test @@ -180,8 +180,8 @@ public class AutoCreateTest extends ActiveMQTestBase { AssertionLoggerHandler.startCapture(); server.getConfiguration().setAddressQueueScanPeriod(-1); // disabling scanner, we will perform it manually AddressSettings settings = new AddressSettings().setAutoDeleteQueues(true).setAutoDeleteAddresses(true).setAutoDeleteAddressesDelay(10).setAutoDeleteQueuesDelay(10); - server.getConfiguration().getAddressesSettings().clear(); - server.getConfiguration().getAddressesSettings().put("#", settings); + server.getConfiguration().getAddressSettings().clear(); + server.getConfiguration().getAddressSettings().put("#", settings); server.start(); String ADDRESS_NAME = getName(); @@ -217,8 +217,8 @@ public class AutoCreateTest extends ActiveMQTestBase { AssertionLoggerHandler.startCapture(); server.getConfiguration().setAddressQueueScanPeriod(-1); // disabling scanner, we will perform it manually AddressSettings settings = new AddressSettings().setAutoDeleteQueues(true).setAutoDeleteAddresses(true).setAutoDeleteAddressesDelay(10).setAutoDeleteQueuesDelay(10); - server.getConfiguration().getAddressesSettings().clear(); - server.getConfiguration().getAddressesSettings().put("#", settings); + server.getConfiguration().getAddressSettings().clear(); + server.getConfiguration().getAddressSettings().put("#", settings); server.start(); String ADDRESS_NAME = getName(); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/ConsumerWindowSizeTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/ConsumerWindowSizeTest.java index 156c8159b5..f6118788c8 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/ConsumerWindowSizeTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/ConsumerWindowSizeTest.java @@ -1399,7 +1399,7 @@ public class ConsumerWindowSizeTest extends ActiveMQTestBase { final AddressSettings settings = new AddressSettings(); settings.setDefaultConsumerWindowSize(defaultConsumerWindowSize); messagingService.getConfiguration() - .getAddressesSettings().put(queueA.toString(), settings); + .getAddressSettings().put(queueA.toString(), settings); messagingService.start(); messagingService.createQueue(new QueueConfiguration(queueA).setRoutingType(RoutingType.ANYCAST)); @@ -1421,7 +1421,7 @@ public class ConsumerWindowSizeTest extends ActiveMQTestBase { final AddressSettings settings = new AddressSettings(); settings.setDefaultConsumerWindowSize(defaultConsumerWindowSize); messagingService.getConfiguration() - .getAddressesSettings().put(addressA.toString(), settings); + .getAddressSettings().put(addressA.toString(), settings); messagingService.start(); messagingService.createQueue(new QueueConfiguration(queueA).setAddress(addressA).setRoutingType(RoutingType.ANYCAST)); @@ -1448,7 +1448,7 @@ public class ConsumerWindowSizeTest extends ActiveMQTestBase { final AddressSettings settings = new AddressSettings(); settings.setDefaultConsumerWindowSize(defaultConsumerWindowSize); messagingService.getConfiguration() - .getAddressesSettings().put("#", settings); + .getAddressSettings().put("#", settings); messagingService.start(); messagingService.createQueue(new QueueConfiguration(queueA).setRoutingType(RoutingType.ANYCAST)); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/CoreClientTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/CoreClientTest.java index 9ef50b75ac..1ae753a90f 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/CoreClientTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/CoreClientTest.java @@ -169,7 +169,7 @@ public class CoreClientTest extends ActiveMQTestBase { Configuration configuration = createBasicConfig(); configuration.clearAcceptorConfigurations(); - configuration.addAddressesSetting("#", new AddressSettings().setMaxSizeBytes(10 * 1024 * 1024).setPageSizeBytes(1024 * 1024)); + configuration.addAddressSetting("#", new AddressSettings().setMaxSizeBytes(10 * 1024 * 1024).setPageSizeBytes(1024 * 1024)); String baseAddress = "foo"; diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/InfiniteRedeliveryTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/InfiniteRedeliveryTest.java index 50c33a9ec7..bbdb536fa6 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/InfiniteRedeliveryTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/InfiniteRedeliveryTest.java @@ -123,13 +123,13 @@ public class InfiniteRedeliveryTest extends ActiveMQTestBase { protected void startServer(boolean reschedule) throws Exception { createReplicatedConfigs(); Configuration configuration = liveServer.getServer().getConfiguration(); - configuration.getAddressesSettings().clear(); + configuration.getAddressSettings().clear(); if (reschedule) { AddressSettings settings = new AddressSettings().setMaxDeliveryAttempts(Integer.MAX_VALUE).setRedeliveryDelay(1); - configuration.getAddressesSettings().put("#", settings); + configuration.getAddressSettings().put("#", settings); } else { AddressSettings settings = new AddressSettings().setMaxDeliveryAttempts(Integer.MAX_VALUE).setRedeliveryDelay(0); - configuration.getAddressesSettings().put("#", settings); + configuration.getAddressSettings().put("#", settings); } liveServer.start(); backupServer.start(); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/MessageConsumerRollbackTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/MessageConsumerRollbackTest.java index b5db065d7b..cad0701003 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/MessageConsumerRollbackTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/MessageConsumerRollbackTest.java @@ -56,7 +56,7 @@ public class MessageConsumerRollbackTest extends ActiveMQTestBase { server = createServer(true, true); AddressSettings settings = new AddressSettings().setRedeliveryDelay(100); - server.getConfiguration().getAddressesSettings().put("#", settings); + server.getConfiguration().getAddressSettings().put("#", settings); server.start(); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/ProducerTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/ProducerTest.java index 8c5d6ac6b7..ac6cd3042b 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/ProducerTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/ProducerTest.java @@ -86,8 +86,8 @@ public class ProducerTest extends ActiveMQTestBase { final ServerLocator locator = createInVMNonHALocator(); AddressSettings setting = new AddressSettings().setAddressFullMessagePolicy(AddressFullMessagePolicy.BLOCK).setMaxSizeBytes(10 * 1024); server.stop(); - server.getConfiguration().getAddressesSettings().clear(); - server.getConfiguration().getAddressesSettings().put(QUEUE.toString(), setting); + server.getConfiguration().getAddressSettings().clear(); + server.getConfiguration().getAddressSettings().put(QUEUE.toString(), setting); server.start(); server.createQueue(new QueueConfiguration(QUEUE)); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/distribution/AutoDeleteDistributedTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/distribution/AutoDeleteDistributedTest.java index 02eb2450d8..3b3ff392b0 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/distribution/AutoDeleteDistributedTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/distribution/AutoDeleteDistributedTest.java @@ -183,7 +183,7 @@ public class AutoDeleteDistributedTest extends ClusterTestBase { setupServer(0, isFileStorage(), isNetty()); setupServer(1, isFileStorage(), isNetty()); setupServer(2, isFileStorage(), isNetty()); - servers[0].getConfiguration().addAddressesSetting("*", new AddressSettings().setAutoCreateAddresses(true) // + servers[0].getConfiguration().addAddressSetting("*", new AddressSettings().setAutoCreateAddresses(true) // .setAutoCreateQueues(true) // .setAutoDeleteAddresses(true) // .setAutoDeleteQueues(true) // --> this causes IllegalStateExceptions diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/distribution/ClusteredMessageCounterTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/distribution/ClusteredMessageCounterTest.java index 62bdf37ab7..ecfc58aa3f 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/distribution/ClusteredMessageCounterTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/distribution/ClusteredMessageCounterTest.java @@ -87,7 +87,7 @@ public class ClusteredMessageCounterTest extends ClusterTestBase { @Override protected ConfigurationImpl createBasicConfig(final int serverID) { ConfigurationImpl config = super.createBasicConfig(serverID); - Map addrSettingsMap = config.getAddressesSettings(); + Map addrSettingsMap = config.getAddressSettings(); AddressSettings addrSettings = new AddressSettings(); addrSettings.setMaxSizeBytes(10 * 1024); addrSettings.setPageSizeBytes(5 * 1024); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/distribution/TwoWayTwoNodeClusterTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/distribution/TwoWayTwoNodeClusterTest.java index c117b565e4..a84738b11e 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/distribution/TwoWayTwoNodeClusterTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/distribution/TwoWayTwoNodeClusterTest.java @@ -118,8 +118,8 @@ public class TwoWayTwoNodeClusterTest extends ClusterTestBase { closeAllSessionFactories(); stopServers(0, 1); - AddressSettings addressSettings0 = config0.getAddressesSettings().get("#"); - AddressSettings addressSettings1 = config1.getAddressesSettings().get("#"); + AddressSettings addressSettings0 = config0.getAddressSettings().get("#"); + AddressSettings addressSettings1 = config1.getAddressSettings().get("#"); addressSettings0.setMaxSizeBytes(-1); addressSettings1.setMaxSizeBytes(-1); @@ -151,7 +151,7 @@ public class TwoWayTwoNodeClusterTest extends ClusterTestBase { config.setJournalMinFiles(20); config.setJournalCompactPercentage(50); - Map addressSettingsMap0 = config.getAddressesSettings(); + Map addressSettingsMap0 = config.getAddressSettings(); AddressSettings addrSettings = addressSettingsMap0.get("#"); if (addrSettings == null) { addrSettings = new AddressSettings(); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/SharedStoreScaleDownBackupTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/SharedStoreScaleDownBackupTest.java index 9bd16e8b48..fd0c78154c 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/SharedStoreScaleDownBackupTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/SharedStoreScaleDownBackupTest.java @@ -57,8 +57,8 @@ public class SharedStoreScaleDownBackupTest extends ClusterTestBase { setScaleDownConfiguration(new ScaleDownConfiguration().setEnabled(true).addConnector( getServer(2).getConfiguration().getClusterConfigurations().get(0).getStaticConnectors().get(0))); - getServer(0).getConfiguration().getAddressesSettings().put("#", new AddressSettings().setRedistributionDelay(0)); - getServer(1).getConfiguration().getAddressesSettings().put("#", new AddressSettings().setRedistributionDelay(0)); + getServer(0).getConfiguration().getAddressSettings().put("#", new AddressSettings().setRedistributionDelay(0)); + getServer(1).getConfiguration().getAddressSettings().put("#", new AddressSettings().setRedistributionDelay(0)); startServers(0, 1, 2); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/crossprotocol/AMQPToJMSCoreTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/crossprotocol/AMQPToJMSCoreTest.java index 381471d9f0..b4ff75905c 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/crossprotocol/AMQPToJMSCoreTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/crossprotocol/AMQPToJMSCoreTest.java @@ -60,7 +60,7 @@ public class AMQPToJMSCoreTest extends ActiveMQTestBase { server.waitForActivation(10, TimeUnit.SECONDS); Configuration serverConfig = server.getConfiguration(); - serverConfig.getAddressesSettings().put("#", new AddressSettings().setAutoCreateQueues(false) + serverConfig.getAddressSettings().put("#", new AddressSettings().setAutoCreateQueues(false) .setAutoCreateAddresses(false) .setDeadLetterAddress(new SimpleString("ActiveMQ.DLQ"))); serverConfig.setSecurityEnabled(false); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/crossprotocol/AMQPToOpenwireTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/crossprotocol/AMQPToOpenwireTest.java index 2b84152967..2d0ff4b66e 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/crossprotocol/AMQPToOpenwireTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/crossprotocol/AMQPToOpenwireTest.java @@ -73,7 +73,7 @@ public class AMQPToOpenwireTest extends ActiveMQTestBase { server.waitForActivation(10, TimeUnit.SECONDS); Configuration serverConfig = server.getConfiguration(); - serverConfig.getAddressesSettings().put("#", new AddressSettings().setAutoCreateQueues(false).setAutoCreateAddresses(false).setDeadLetterAddress(new SimpleString("ActiveMQ.DLQ"))); + serverConfig.getAddressSettings().put("#", new AddressSettings().setAutoCreateQueues(false).setAutoCreateAddresses(false).setDeadLetterAddress(new SimpleString("ActiveMQ.DLQ"))); serverConfig.setSecurityEnabled(false); coreQueue = new SimpleString(queueName); server.createQueue(new QueueConfiguration(coreQueue).setRoutingType(RoutingType.ANYCAST).setDurable(false)); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/crossprotocol/AMQPToStompTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/crossprotocol/AMQPToStompTest.java index 4106f85215..088f9ff6c2 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/crossprotocol/AMQPToStompTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/crossprotocol/AMQPToStompTest.java @@ -54,7 +54,7 @@ public class AMQPToStompTest extends ActiveMQTestBase { server.waitForActivation(10, TimeUnit.SECONDS); Configuration serverConfig = server.getConfiguration(); - serverConfig.getAddressesSettings().put("#", new AddressSettings().setAutoCreateQueues(false) + serverConfig.getAddressSettings().put("#", new AddressSettings().setAutoCreateQueues(false) .setAutoCreateAddresses(false) .setDeadLetterAddress(new SimpleString("ActiveMQ.DLQ"))); serverConfig.setSecurityEnabled(false); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/crossprotocol/OpenWireToAMQPTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/crossprotocol/OpenWireToAMQPTest.java index d66d7c413e..24d4b5be2d 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/crossprotocol/OpenWireToAMQPTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/crossprotocol/OpenWireToAMQPTest.java @@ -60,7 +60,7 @@ public class OpenWireToAMQPTest extends ActiveMQTestBase { super.setUp(); server = createServer(true, true); Configuration serverConfig = server.getConfiguration(); - serverConfig.getAddressesSettings().put("#", new AddressSettings().setAutoCreateQueues(true).setAutoCreateAddresses(true).setDeadLetterAddress(new SimpleString("ActiveMQ.DLQ"))); + serverConfig.getAddressSettings().put("#", new AddressSettings().setAutoCreateQueues(true).setAutoCreateAddresses(true).setDeadLetterAddress(new SimpleString("ActiveMQ.DLQ"))); serverConfig.setSecurityEnabled(false); server.start(); coreQueue = new SimpleString(queueName); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/crossprotocol/OpenwireAmqpResenderTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/crossprotocol/OpenwireAmqpResenderTest.java index 2439ec9318..597a8c5273 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/crossprotocol/OpenwireAmqpResenderTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/crossprotocol/OpenwireAmqpResenderTest.java @@ -58,7 +58,7 @@ public class OpenwireAmqpResenderTest extends ActiveMQTestBase { qpidFactory = new JmsConnectionFactory(AMQP_URL); Configuration serverConfig = server.getConfiguration(); - serverConfig.getAddressesSettings().put("#", new AddressSettings().setAutoCreateQueues(true) + serverConfig.getAddressSettings().put("#", new AddressSettings().setAutoCreateQueues(true) .setAutoCreateAddresses(true).setDeadLetterAddress(new SimpleString("ActiveMQ.DLQ"))); serverConfig.setSecurityEnabled(false); server.start(); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/divert/DivertTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/divert/DivertTest.java index f1549e75a3..53a6425e27 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/divert/DivertTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/divert/DivertTest.java @@ -427,7 +427,7 @@ public class DivertTest extends ActiveMQTestBase { DivertConfiguration divertConf = new DivertConfiguration().setName("divert1").setRoutingName("divert1").setAddress(testAddress).setForwardingAddress(forwardAddress); - Configuration config = createDefaultInVMConfig().addDivertConfiguration(divertConf).clearAddressesSettings().addAddressesSetting("#", expirySettings); + Configuration config = createDefaultInVMConfig().addDivertConfiguration(divertConf).clearAddressSettings().addAddressSetting("#", expirySettings); ActiveMQServer server = addServer(ActiveMQServers.newActiveMQServer(config, true)); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/DuplicateRecordIdTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/DuplicateRecordIdTest.java index b21a7d3a86..7f4efb5337 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/DuplicateRecordIdTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/DuplicateRecordIdTest.java @@ -35,7 +35,7 @@ public class DuplicateRecordIdTest extends ActiveMQTestBase { @Before public void setUp() throws Exception { super.setUp(); - server = createServer(false, createDefaultInVMConfig().addAddressesSetting("#", new AddressSettings().setDeadLetterAddress(new SimpleString("dlq")).setExpiryAddress(new SimpleString("dlq")))); + server = createServer(false, createDefaultInVMConfig().addAddressSetting("#", new AddressSettings().setDeadLetterAddress(new SimpleString("dlq")).setExpiryAddress(new SimpleString("dlq")))); server.getConfiguration().setPersistenceEnabled(true); } diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/mqtt/MQTTTestSupport.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/mqtt/MQTTTestSupport.java index 2eeead1670..d3f0417fb1 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/mqtt/MQTTTestSupport.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/mqtt/MQTTTestSupport.java @@ -219,7 +219,7 @@ public class MQTTTestSupport extends ActiveMQTestBase { AddressSettings addressSettings = new AddressSettings(); addressSettings.setDeadLetterAddress(SimpleString.toSimpleString("DLA")); addressSettings.setExpiryAddress(SimpleString.toSimpleString("EXPIRY")); - defaultConfig.getAddressesSettings().put("#", addressSettings); + defaultConfig.getAddressSettings().put("#", addressSettings); return createServer(true, defaultConfig); } diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/mqtt/MqttClusterRemoteSubscribeTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/mqtt/MqttClusterRemoteSubscribeTest.java index 892daf4c29..e550d2499b 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/mqtt/MqttClusterRemoteSubscribeTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/mqtt/MqttClusterRemoteSubscribeTest.java @@ -1299,11 +1299,11 @@ public class MqttClusterRemoteSubscribeTest extends ClusterTestBase { setupServer(0, false, isNetty()); servers[0].getConfiguration().setWildCardConfiguration(wildcardConfiguration); servers[0].getConfiguration().addAddressConfiguration(coreAddressConfiguration); - servers[0].getConfiguration().addAddressesSetting("#", addressSettings); + servers[0].getConfiguration().addAddressSetting("#", addressSettings); setupServer(1, false, isNetty()); servers[1].getConfiguration().setWildCardConfiguration(wildcardConfiguration); servers[1].getConfiguration().addAddressConfiguration(coreAddressConfiguration); - servers[1].getConfiguration().addAddressesSetting("#", addressSettings); + servers[1].getConfiguration().addAddressSetting("#", addressSettings); setupClusterConnection("cluster0", "", MessageLoadBalancingType.ON_DEMAND, 1, isNetty(), 0, 1); setupClusterConnection("cluster1", "", MessageLoadBalancingType.ON_DEMAND, 1, isNetty(), 1, 0); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/mqtt/MqttClusterWildcardTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/mqtt/MqttClusterWildcardTest.java index bc7c0e83c1..cf6dc6fc5d 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/mqtt/MqttClusterWildcardTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/mqtt/MqttClusterWildcardTest.java @@ -142,8 +142,8 @@ public class MqttClusterWildcardTest extends ClusterTestBase { // allow redistribution AddressSettings addressSettings = new AddressSettings(); addressSettings.setRedistributionDelay(0); - servers[0].getConfiguration().addAddressesSetting("#", addressSettings); - servers[1].getConfiguration().addAddressesSetting("#", addressSettings); + servers[0].getConfiguration().addAddressSetting("#", addressSettings); + servers[1].getConfiguration().addAddressSetting("#", addressSettings); setupClusterConnection("cluster0", "", MessageLoadBalancingType.ON_DEMAND, 1, isNetty(), 0, 1); setupClusterConnection("cluster1", "", MessageLoadBalancingType.ON_DEMAND, 1, isNetty(), 1, 0); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/mqtt5/MQTT5TestSupport.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/mqtt5/MQTT5TestSupport.java index 73a2dbe983..ff4bf7f693 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/mqtt5/MQTT5TestSupport.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/mqtt5/MQTT5TestSupport.java @@ -239,7 +239,7 @@ public class MQTT5TestSupport extends ActiveMQTestBase { AddressSettings addressSettings = new AddressSettings(); addressSettings.setDeadLetterAddress(DEAD_LETTER_ADDRESS); addressSettings.setExpiryAddress(EXPIRY_ADDRESS); - defaultConfig.getAddressesSettings().put("#", addressSettings); + defaultConfig.getAddressSettings().put("#", addressSettings); defaultConfig.setMqttSessionScanInterval(200); return createServer(true, defaultConfig); } diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/LargeMessageQueueAutoCreationTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/LargeMessageQueueAutoCreationTest.java index ea1e3ad36f..9d8ef2861b 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/LargeMessageQueueAutoCreationTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/LargeMessageQueueAutoCreationTest.java @@ -84,7 +84,7 @@ public class LargeMessageQueueAutoCreationTest extends BasicOpenWireTest { @Override protected void extraServerConfig(Configuration serverConfig) { serverConfig.setJournalType(JournalType.NIO); - Map map = serverConfig.getAddressesSettings(); + Map map = serverConfig.getAddressSettings(); Map.Entry entry = map.entrySet().iterator().next(); AddressSettings settings = entry.getValue(); settings.setAutoCreateQueues(true); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/OpenWireTestBase.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/OpenWireTestBase.java index 6bb3472b27..7f9ecdb652 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/OpenWireTestBase.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/OpenWireTestBase.java @@ -61,7 +61,7 @@ public class OpenWireTestBase extends ActiveMQTestBase { Configuration serverConfig = server.getConfiguration(); - Map addressSettingsMap = serverConfig.getAddressesSettings(); + Map addressSettingsMap = serverConfig.getAddressSettings(); configureAddressSettings(addressSettingsMap); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/amq/JmsDurableQueueWildcardSendReceiveTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/amq/JmsDurableQueueWildcardSendReceiveTest.java index 1764b6076d..0f29f4e5bf 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/amq/JmsDurableQueueWildcardSendReceiveTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/amq/JmsDurableQueueWildcardSendReceiveTest.java @@ -45,7 +45,7 @@ public class JmsDurableQueueWildcardSendReceiveTest extends JmsTopicSendReceiveT @Override protected void extraServerConfig(Configuration serverConfig) { - AddressSettings settings = serverConfig.getAddressesSettings().get("#"); + AddressSettings settings = serverConfig.getAddressSettings().get("#"); if (settings != null) { settings.setAutoCreateQueues(true); } diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/amq/ProducerAutoCreateQueueTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/amq/ProducerAutoCreateQueueTest.java index f9ed2acd51..b9207af9d4 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/amq/ProducerAutoCreateQueueTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/amq/ProducerAutoCreateQueueTest.java @@ -38,7 +38,7 @@ public class ProducerAutoCreateQueueTest extends BasicOpenWireTest { protected void extraServerConfig(Configuration serverConfig) { serverConfig.setAddressQueueScanPeriod(100); String match = "#"; - Map asMap = serverConfig.getAddressesSettings(); + Map asMap = serverConfig.getAddressSettings(); asMap.get(match).setAutoCreateAddresses(true).setAutoCreateQueues(true); } diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/amq/ProducerBlockingTtlTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/amq/ProducerBlockingTtlTest.java index 8473d676a4..a61eb0c066 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/amq/ProducerBlockingTtlTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/amq/ProducerBlockingTtlTest.java @@ -45,7 +45,7 @@ public class ProducerBlockingTtlTest extends BasicOpenWireTest { @Override protected void extraServerConfig(Configuration serverConfig) { String match = "#"; - Map asMap = serverConfig.getAddressesSettings(); + Map asMap = serverConfig.getAddressSettings(); asMap.get(match).setMaxSizeBytes(1).setAddressFullMessagePolicy(AddressFullMessagePolicy.BLOCK); } diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/amq/ProducerFlowControlBaseTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/amq/ProducerFlowControlBaseTest.java index 2166201f1e..5914069cf6 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/amq/ProducerFlowControlBaseTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/amq/ProducerFlowControlBaseTest.java @@ -117,7 +117,7 @@ public class ProducerFlowControlBaseTest extends BasicOpenWireTest { @Override protected void extraServerConfig(Configuration serverConfig) { String match = "#"; - Map asMap = serverConfig.getAddressesSettings(); + Map asMap = serverConfig.getAddressSettings(); asMap.get(match).setMaxSizeBytes(1).setAddressFullMessagePolicy(AddressFullMessagePolicy.BLOCK); } diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/amq/ProducerFlowControlSendFailTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/amq/ProducerFlowControlSendFailTest.java index f417725afe..df8ec8f00e 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/amq/ProducerFlowControlSendFailTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/amq/ProducerFlowControlSendFailTest.java @@ -58,7 +58,7 @@ public class ProducerFlowControlSendFailTest extends ProducerFlowControlBaseTest @Override protected void extraServerConfig(Configuration serverConfig) { String match = "#"; - Map asMap = serverConfig.getAddressesSettings(); + Map asMap = serverConfig.getAddressSettings(); asMap.get(match).setMaxSizeBytes(1).setAddressFullMessagePolicy(AddressFullMessagePolicy.FAIL); } diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/paging/AnonymousProducerPageTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/paging/AnonymousProducerPageTest.java index 9e232c0b87..c23900dae8 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/paging/AnonymousProducerPageTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/paging/AnonymousProducerPageTest.java @@ -69,8 +69,8 @@ public class AnonymousProducerPageTest extends ActiveMQTestBase { this.server = addServer(this.createServer(true, true)); - server.getConfiguration().getAddressesSettings().clear(); - server.getConfiguration().addAddressesSetting("#", new AddressSettings().setAddressFullMessagePolicy(AddressFullMessagePolicy.PAGE)); + server.getConfiguration().getAddressSettings().clear(); + server.getConfiguration().addAddressSetting("#", new AddressSettings().setAddressFullMessagePolicy(AddressFullMessagePolicy.PAGE)); server.getConfiguration().getAcceptorConfigurations().clear(); server.getConfiguration().getAcceptorConfigurations().add(addAcceptorConfiguration(server, port)); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/paging/MultipleProducersPagingTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/paging/MultipleProducersPagingTest.java index 367ae9f15c..d954c05196 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/paging/MultipleProducersPagingTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/paging/MultipleProducersPagingTest.java @@ -72,7 +72,7 @@ public class MultipleProducersPagingTest extends ActiveMQTestBase { server = createServer(createBasicConfig() .setPersistenceEnabled(false) - .setAddressesSettings(Collections.singletonMap("#", new AddressSettings() + .setAddressSettings(Collections.singletonMap("#", new AddressSettings() .setAddressFullMessagePolicy(AddressFullMessagePolicy.PAGE) .setPageSizeBytes(50000) .setMaxSizeBytes(404850))) diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/paging/SpawnedServerSupport.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/paging/SpawnedServerSupport.java index b309404789..0da1eac371 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/paging/SpawnedServerSupport.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/paging/SpawnedServerSupport.java @@ -51,7 +51,7 @@ public class SpawnedServerSupport { static Configuration createConfig(String folder) { AddressSettings settings = new AddressSettings().setMaxDeliveryAttempts(-1).setAddressFullMessagePolicy(AddressFullMessagePolicy.PAGE).setPageSizeBytes(10 * 1024).setMaxSizeBytes(100 * 1024); - Configuration config = new ConfigurationImpl().setSecurityEnabled(false).setJournalMinFiles(2).setJournalFileSize(100 * 1024).setJournalType(ActiveMQTestBase.getDefaultJournalType()).setJournalCompactMinFiles(0).setJournalCompactPercentage(0).setClusterPassword(ActiveMQTestBase.CLUSTER_PASSWORD).setJournalDirectory(ActiveMQTestBase.getJournalDir(folder, 0, false)).setBindingsDirectory(ActiveMQTestBase.getBindingsDir(folder, 0, false)).setPagingDirectory(ActiveMQTestBase.getPageDir(folder, 0, false)).setLargeMessagesDirectory(ActiveMQTestBase.getLargeMessagesDir(folder, 0, false)).setPersistenceEnabled(true).addAddressesSetting("#", settings).addAcceptorConfiguration(new TransportConfiguration(ActiveMQTestBase.NETTY_ACCEPTOR_FACTORY)); + Configuration config = new ConfigurationImpl().setSecurityEnabled(false).setJournalMinFiles(2).setJournalFileSize(100 * 1024).setJournalType(ActiveMQTestBase.getDefaultJournalType()).setJournalCompactMinFiles(0).setJournalCompactPercentage(0).setClusterPassword(ActiveMQTestBase.CLUSTER_PASSWORD).setJournalDirectory(ActiveMQTestBase.getJournalDir(folder, 0, false)).setBindingsDirectory(ActiveMQTestBase.getBindingsDir(folder, 0, false)).setPagingDirectory(ActiveMQTestBase.getPageDir(folder, 0, false)).setLargeMessagesDirectory(ActiveMQTestBase.getLargeMessagesDir(folder, 0, false)).setPersistenceEnabled(true).addAddressSetting("#", settings).addAcceptorConfiguration(new TransportConfiguration(ActiveMQTestBase.NETTY_ACCEPTOR_FACTORY)); return config; } diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/persistence/ConfigChangeTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/persistence/ConfigChangeTest.java index d098e2aad2..d7127f397a 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/persistence/ConfigChangeTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/persistence/ConfigChangeTest.java @@ -42,7 +42,7 @@ public class ConfigChangeTest extends ActiveMQTestBase { @Test public void testChangeQueueRoutingTypeOnRestart() throws Exception { Configuration configuration = createDefaultInVMConfig(); - configuration.addAddressesSetting("#", new AddressSettings()); + configuration.addAddressSetting("#", new AddressSettings()); List addressConfigurations = new ArrayList(); CoreAddressConfiguration addressConfiguration = new CoreAddressConfiguration() @@ -93,7 +93,7 @@ public class ConfigChangeTest extends ActiveMQTestBase { final String filter2 = "x = 'y'"; Configuration configuration = createDefaultInVMConfig( ); - configuration.addAddressesSetting("#", new AddressSettings()); + configuration.addAddressSetting("#", new AddressSettings()); List addressConfigurations = new ArrayList(); CoreAddressConfiguration addressConfiguration = new CoreAddressConfiguration() diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/plugin/OpenwirePluginTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/plugin/OpenwirePluginTest.java index 5efb212bd6..91dada5735 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/plugin/OpenwirePluginTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/plugin/OpenwirePluginTest.java @@ -93,7 +93,7 @@ public class OpenwirePluginTest extends BasicOpenWireTest { } }); - configuration.getAddressesSettings().put("autoCreated", new AddressSettings().setAutoDeleteAddresses(true) + configuration.getAddressSettings().put("autoCreated", new AddressSettings().setAutoDeleteAddresses(true) .setAutoDeleteQueues(true).setAutoCreateQueues(true).setAutoCreateAddresses(true)); return server; diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/routing/ElasticQueueTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/routing/ElasticQueueTest.java index 87eae8e7a1..d1309951a8 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/routing/ElasticQueueTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/routing/ElasticQueueTest.java @@ -425,7 +425,7 @@ public class ElasticQueueTest extends ActiveMQTestBase { .setAutoDeleteQueues(false).setAutoDeleteAddresses(false); // so slow consumer can kick in! Configuration baseConfig = new ConfigurationImpl(); - baseConfig.getAddressesSettings().put(qName, blockingQueue); + baseConfig.getAddressSettings().put(qName, blockingQueue); ConnectionRouterConfiguration connectionRouterConfiguration = new ConnectionRouterConfiguration(); connectionRouterConfiguration.setName(roleNameSharder).setKeyType(KeyType.ROLE_NAME).setKeyFilter("(?<=^EQ_).*"); // strip EQ_ prefix diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/scheduling/ScheduledMessageTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/scheduling/ScheduledMessageTest.java index 19296ec539..29b7eb60bf 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/scheduling/ScheduledMessageTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/scheduling/ScheduledMessageTest.java @@ -744,7 +744,7 @@ public class ScheduledMessageTest extends ActiveMQTestBase { server.stop(); - configuration = createDefaultInVMConfig().addAddressesSetting(atestq.toString(), qs); + configuration = createDefaultInVMConfig().addAddressSetting(atestq.toString(), qs); server = createServer(true, configuration); server.start(); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/server/PotentialOOMELoggingTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/server/PotentialOOMELoggingTest.java index a64c548351..b5af7b320a 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/server/PotentialOOMELoggingTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/server/PotentialOOMELoggingTest.java @@ -46,7 +46,7 @@ public class PotentialOOMELoggingTest extends ActiveMQTestBase { server.getConfiguration().addQueueConfiguration(new QueueConfiguration(UUID.randomUUID().toString())); } server.getConfiguration().setGlobalMaxSize(-1); - server.getConfiguration().getAddressesSettings().put("#", new AddressSettings().setMaxSizeBytes(10485760 * 10)); + server.getConfiguration().getAddressSettings().put("#", new AddressSettings().setMaxSizeBytes(10485760 * 10)); server.start(); // Using the code only so the test doesn't fail just because someone edits the log text diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/server/ScaleDownRemoveSFTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/server/ScaleDownRemoveSFTest.java index c3cae96e1d..5658bd79ea 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/server/ScaleDownRemoveSFTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/server/ScaleDownRemoveSFTest.java @@ -58,8 +58,8 @@ public class ScaleDownRemoveSFTest extends ClusterTestBase { setupClusterConnection("cluster0", "testAddress", MessageLoadBalancingType.ON_DEMAND, 1, isNetty(), 1, 0); haPolicyConfiguration0.getScaleDownConfiguration().getConnectors().addAll(servers[0].getConfiguration().getClusterConfigurations().iterator().next().getStaticConnectors()); haPolicyConfiguration1.getScaleDownConfiguration().getConnectors().addAll(servers[1].getConfiguration().getClusterConfigurations().iterator().next().getStaticConnectors()); - servers[0].getConfiguration().getAddressesSettings().put("#", new AddressSettings().setRedistributionDelay(0)); - servers[1].getConfiguration().getAddressesSettings().put("#", new AddressSettings().setRedistributionDelay(0)); + servers[0].getConfiguration().getAddressSettings().put("#", new AddressSettings().setRedistributionDelay(0)); + servers[1].getConfiguration().getAddressSettings().put("#", new AddressSettings().setRedistributionDelay(0)); startServers(0, 1); setupSessionFactory(0, isNetty()); setupSessionFactory(1, isNetty()); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/server/ScaleDownTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/server/ScaleDownTest.java index ba6f74850d..9b4f1df545 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/server/ScaleDownTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/server/ScaleDownTest.java @@ -100,8 +100,8 @@ public class ScaleDownTest extends ClusterTestBase { setupClusterConnection("cluster0", "testAddress", MessageLoadBalancingType.ON_DEMAND, 1, isNetty(), 1, 0); haPolicyConfiguration0.getScaleDownConfiguration().getConnectors().addAll(servers[0].getConfiguration().getClusterConfigurations().iterator().next().getStaticConnectors()); haPolicyConfiguration1.getScaleDownConfiguration().getConnectors().addAll(servers[1].getConfiguration().getClusterConfigurations().iterator().next().getStaticConnectors()); - servers[0].getConfiguration().getAddressesSettings().put("#", new AddressSettings().setRedistributionDelay(0)); - servers[1].getConfiguration().getAddressesSettings().put("#", new AddressSettings().setRedistributionDelay(0)); + servers[0].getConfiguration().getAddressSettings().put("#", new AddressSettings().setRedistributionDelay(0)); + servers[1].getConfiguration().getAddressSettings().put("#", new AddressSettings().setRedistributionDelay(0)); startServers(0, 1); setupSessionFactory(0, isNetty()); setupSessionFactory(1, isNetty()); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/util/JMSClusteredTestBase.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/util/JMSClusteredTestBase.java index dd29b42b65..42e5eca805 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/util/JMSClusteredTestBase.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/util/JMSClusteredTestBase.java @@ -169,7 +169,7 @@ public class JMSClusteredTestBase extends ActiveMQTestBase { } })); - configuration.getAddressesSettings().put("#", new AddressSettings().setRedistributionDelay(0)); + configuration.getAddressSettings().put("#", new AddressSettings().setRedistributionDelay(0)); return configuration; }