ARTEMIS-3438 legacy updateQueue doesn't respect ringSize
This commit is contained in:
parent
eb73709a1a
commit
3fd0eea667
|
@ -1392,7 +1392,7 @@ public class ActiveMQServerControlImpl extends AbstractControl implements Active
|
|||
clearIO();
|
||||
|
||||
try {
|
||||
final Queue queue = server.updateQueue(name, routingType != null ? RoutingType.valueOf(routingType) : null, filter, maxConsumers, purgeOnNoConsumers, exclusive, groupRebalance, groupBuckets, groupFirstKey, nonDestructive, consumersBeforeDispatch, delayBeforeDispatch, user);
|
||||
final Queue queue = server.updateQueue(name, routingType != null ? RoutingType.valueOf(routingType) : null, filter, maxConsumers, purgeOnNoConsumers, exclusive, groupRebalance, groupBuckets, groupFirstKey, nonDestructive, consumersBeforeDispatch, delayBeforeDispatch, user, ringSize);
|
||||
if (queue == null) {
|
||||
if (AuditLogger.isResourceLoggingEnabled()) {
|
||||
AuditLogger.updateQueueFailure(name, routingType);
|
||||
|
|
|
@ -663,6 +663,37 @@ public class ActiveMQServerControlTest extends ManagementTestBase {
|
|||
serverControl.destroyQueue(name.toString());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testCreateAndLegacyUpdateQueueRingSize() 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).toJSON());
|
||||
serverControl.updateQueue(name.toString(),
|
||||
RoutingType.ANYCAST.toString(),
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
101L);
|
||||
|
||||
QueueControl queueControl = ManagementControlHelper.createQueueControl(address, name, RoutingType.ANYCAST, mbeanServer);
|
||||
Assert.assertEquals(address.toString(), queueControl.getAddress());
|
||||
Assert.assertEquals(name.toString(), queueControl.getName());
|
||||
Assert.assertEquals(101, queueControl.getRingSize());
|
||||
|
||||
serverControl.destroyQueue(name.toString());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testGetQueueCount() throws Exception {
|
||||
SimpleString address = RandomUtil.randomSimpleString();
|
||||
|
|
Loading…
Reference in New Issue