This closes #3195
This commit is contained in:
commit
18acd5f8d4
|
@ -3954,7 +3954,7 @@ public class QueueImpl extends CriticalComponentImpl implements Queue {
|
||||||
.setAddress(address)
|
.setAddress(address)
|
||||||
.setId(id)
|
.setId(id)
|
||||||
.setRoutingType(routingType)
|
.setRoutingType(routingType)
|
||||||
.setFilterString(filter.getFilterString())
|
.setFilterString(filter == null ? null : filter.getFilterString())
|
||||||
.setDurable(isDurable())
|
.setDurable(isDurable())
|
||||||
.setUser(user)
|
.setUser(user)
|
||||||
.setMaxConsumers(maxConsumers)
|
.setMaxConsumers(maxConsumers)
|
||||||
|
@ -3963,7 +3963,7 @@ public class QueueImpl extends CriticalComponentImpl implements Queue {
|
||||||
.setGroupBuckets(groupBuckets)
|
.setGroupBuckets(groupBuckets)
|
||||||
.setGroupFirstKey(groupFirstKey)
|
.setGroupFirstKey(groupFirstKey)
|
||||||
.setLastValue(false)
|
.setLastValue(false)
|
||||||
.setLastValue(null)
|
.setLastValueKey((String) null)
|
||||||
.setNonDestructive(nonDestructive)
|
.setNonDestructive(nonDestructive)
|
||||||
.setPurgeOnNoConsumers(purgeOnNoConsumers)
|
.setPurgeOnNoConsumers(purgeOnNoConsumers)
|
||||||
.setConsumersBeforeDispatch(consumersBeforeDispatch)
|
.setConsumersBeforeDispatch(consumersBeforeDispatch)
|
||||||
|
|
|
@ -567,6 +567,25 @@ public class ActiveMQServerControlTest extends ManagementTestBase {
|
||||||
checkNoResource(ObjectNameBuilder.DEFAULT.getQueueObjectName(address, name, RoutingType.ANYCAST));
|
checkNoResource(ObjectNameBuilder.DEFAULT.getQueueObjectName(address, name, RoutingType.ANYCAST));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testCreateAndUpdateQueueWithoutFilter() throws Exception {
|
||||||
|
SimpleString address = RandomUtil.randomSimpleString();
|
||||||
|
SimpleString name = RandomUtil.randomSimpleString();
|
||||||
|
|
||||||
|
ActiveMQServerControl serverControl = createManagementControl();
|
||||||
|
|
||||||
|
serverControl.createQueue(new QueueConfiguration(name).setAddress(address).setRoutingType(RoutingType.ANYCAST).setAutoCreateAddress(true).setFilterString((String) null).toJSON());
|
||||||
|
serverControl.updateQueue(new QueueConfiguration(name).setAddress(address).setRoutingType(RoutingType.ANYCAST).setMaxConsumers(1).toJSON());
|
||||||
|
|
||||||
|
QueueControl queueControl = ManagementControlHelper.createQueueControl(address, name, RoutingType.ANYCAST, mbeanServer);
|
||||||
|
Assert.assertEquals(address.toString(), queueControl.getAddress());
|
||||||
|
Assert.assertEquals(name.toString(), queueControl.getName());
|
||||||
|
Assert.assertNull(queueControl.getFilter());
|
||||||
|
Assert.assertEquals(1, queueControl.getMaxConsumers());
|
||||||
|
|
||||||
|
serverControl.destroyQueue(name.toString());
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testGetQueueNames() throws Exception {
|
public void testGetQueueNames() throws Exception {
|
||||||
SimpleString address = RandomUtil.randomSimpleString();
|
SimpleString address = RandomUtil.randomSimpleString();
|
||||||
|
|
Loading…
Reference in New Issue