This closes #3195
This commit is contained in:
commit
18acd5f8d4
|
@ -3954,7 +3954,7 @@ public class QueueImpl extends CriticalComponentImpl implements Queue {
|
|||
.setAddress(address)
|
||||
.setId(id)
|
||||
.setRoutingType(routingType)
|
||||
.setFilterString(filter.getFilterString())
|
||||
.setFilterString(filter == null ? null : filter.getFilterString())
|
||||
.setDurable(isDurable())
|
||||
.setUser(user)
|
||||
.setMaxConsumers(maxConsumers)
|
||||
|
@ -3963,7 +3963,7 @@ public class QueueImpl extends CriticalComponentImpl implements Queue {
|
|||
.setGroupBuckets(groupBuckets)
|
||||
.setGroupFirstKey(groupFirstKey)
|
||||
.setLastValue(false)
|
||||
.setLastValue(null)
|
||||
.setLastValueKey((String) null)
|
||||
.setNonDestructive(nonDestructive)
|
||||
.setPurgeOnNoConsumers(purgeOnNoConsumers)
|
||||
.setConsumersBeforeDispatch(consumersBeforeDispatch)
|
||||
|
|
|
@ -567,6 +567,25 @@ public class ActiveMQServerControlTest extends ManagementTestBase {
|
|||
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
|
||||
public void testGetQueueNames() throws Exception {
|
||||
SimpleString address = RandomUtil.randomSimpleString();
|
||||
|
|
Loading…
Reference in New Issue