This commit is contained in:
Justin Bertram 2020-05-01 13:23:50 -05:00
commit 2af6f3d5a2
1 changed files with 18 additions and 0 deletions

View File

@ -17,6 +17,7 @@
package org.apache.activemq.artemis.tests.integration.server;
import org.apache.activemq.artemis.api.core.SimpleString;
import org.apache.activemq.artemis.core.config.CoreQueueConfiguration;
import org.apache.activemq.artemis.core.config.FileDeploymentManager;
import org.apache.activemq.artemis.core.config.impl.FileConfiguration;
import org.apache.activemq.artemis.core.config.impl.SecurityConfiguration;
@ -27,6 +28,7 @@ import org.apache.activemq.artemis.jms.server.config.impl.FileJMSConfiguration;
import org.apache.activemq.artemis.spi.core.security.ActiveMQJAASSecurityManager;
import org.apache.activemq.artemis.spi.core.security.jaas.InVMLoginModule;
import org.apache.activemq.artemis.tests.util.ActiveMQTestBase;
import org.apache.activemq.artemis.tests.util.RandomUtil;
import org.junit.Test;
public class ConfigurationTest extends ActiveMQTestBase {
@ -47,6 +49,22 @@ public class ConfigurationTest extends ActiveMQTestBase {
}
}
@Test
public void testQueueWithoutAddressName() throws Exception {
final SimpleString QUEUE_NAME = RandomUtil.randomSimpleString();
ActiveMQServer server = createServer(false, createDefaultInVMConfig());
try {
server.getConfiguration().addQueueConfiguration(new CoreQueueConfiguration().setName(QUEUE_NAME.toString()));
server.start();
assertTrue(server.getAddressInfo(QUEUE_NAME) != null);
} finally {
try {
server.stop();
} catch (Exception e) {
}
}
}
protected ActiveMQServer getActiveMQServer(String brokerConfig) throws Exception {
FileConfiguration fc = new FileConfiguration();
FileJMSConfiguration fileConfiguration = new FileJMSConfiguration();