Skip to content

Commit

Permalink
ARTEMIS-4396 fill in some gaps
Browse files Browse the repository at this point in the history
  • Loading branch information
jbertram committed Aug 31, 2023
1 parent 7790920 commit 60ac0f3
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,8 @@ public void initQueues(Map<Long, QueueBindingInfo> queueBindingInfosMap,
.setAutoDeleteMessageCount(queueBindingInfo.getAutoDeleteMessageCount())
.setRoutingType(RoutingType.getType(queueBindingInfo.getRoutingType()))
.setConfigurationManaged(queueBindingInfo.isConfigurationManaged())
.setRingSize(queueBindingInfo.getRingSize()),
.setRingSize(queueBindingInfo.getRingSize())
.setInternal(queueBindingInfo.isInternal()),
pagingManager);


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ public synchronized void registerQueue(final Queue queue,
final AddressInfo addressInfo,
final StorageManager storageManager) throws Exception {

if (addressInfo.isInternal()) {
if (addressInfo.isInternal() || queue.isInternalQueue()) {
logger.debug("won't register internal queue: {}", queue);
return;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,18 @@

import org.apache.activemq.artemis.api.core.QueueConfiguration;
import org.apache.activemq.artemis.api.core.SimpleString;
import org.apache.activemq.artemis.api.core.management.ResourceNames;
import org.apache.activemq.artemis.core.server.ActiveMQServer;
import org.apache.activemq.artemis.core.server.Queue;
import org.apache.activemq.artemis.api.core.RoutingType;
import org.apache.activemq.artemis.tests.util.ActiveMQTestBase;
import org.junit.Assert;
import org.junit.Test;

public class QueuePeristPauseTest extends ActiveMQTestBase {
public class QueueConfigPersistenceTest extends ActiveMQTestBase {

@Test
public void testPauseQueue() throws Exception {
public void testPauseQueue() throws Exception {
ActiveMQServer server = createServer(true, false);
server.start();

Expand Down Expand Up @@ -57,4 +58,19 @@ public void testPauseQueue() throws Exception {

server.stop();
}

@Test
public void testInternalQueue() throws Exception {
ActiveMQServer server = createServer(true, false);
server.start();

server.createQueue(new QueueConfiguration(getName()).setInternal(true));
server.stop();
server.start();
Queue queue = server.locateQueue(getName());
Assert.assertTrue(queue.isInternalQueue());
Assert.assertNull(server.getManagementService().getResource(ResourceNames.QUEUE + getName()));

server.stop();
}
}

0 comments on commit 60ac0f3

Please sign in to comment.