Author: clebert.suconic(a)jboss.com
Date: 2011-08-08 12:18:22 -0400 (Mon, 08 Aug 2011)
New Revision: 11148
Modified:
branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/management/impl/HornetQServerControlImpl.java
branches/Branch_2_2_EAP_cluster_clean2/tests/src/org/hornetq/tests/integration/management/HornetQServerControlTest.java
Log:
changes
Modified:
branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/management/impl/HornetQServerControlImpl.java
===================================================================
---
branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/management/impl/HornetQServerControlImpl.java 2011-08-08
16:04:32 UTC (rev 11147)
+++
branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/management/impl/HornetQServerControlImpl.java 2011-08-08
16:18:22 UTC (rev 11148)
@@ -1523,7 +1523,7 @@
checkStarted();
// JBPAPP-6334 requested this to be pageSizeBytes > maxSizeBytes
- if (pageSizeBytes > maxSizeBytes)
+ if (pageSizeBytes > maxSizeBytes && maxSizeBytes > 0)
{
throw new IllegalStateException("pageSize has to be lower than
maxSizeBytes. Invalid argument (" + pageSizeBytes + " < " + maxSizeBytes
+ ")");
}
Modified:
branches/Branch_2_2_EAP_cluster_clean2/tests/src/org/hornetq/tests/integration/management/HornetQServerControlTest.java
===================================================================
---
branches/Branch_2_2_EAP_cluster_clean2/tests/src/org/hornetq/tests/integration/management/HornetQServerControlTest.java 2011-08-08
16:04:32 UTC (rev 11147)
+++
branches/Branch_2_2_EAP_cluster_clean2/tests/src/org/hornetq/tests/integration/management/HornetQServerControlTest.java 2011-08-08
16:18:22 UTC (rev 11148)
@@ -522,8 +522,7 @@
}
assertTrue("Exception expected", ex);
-
- //restartServer();
+ //restartServer();
serverControl = createManagementControl();
String jsonString = serverControl.getAddressSettingsAsJSON(exactAddress);
@@ -540,6 +539,38 @@
assertEquals(redistributionDelay, info.getRedistributionDelay());
assertEquals(sendToDLAOnNoRoute, info.isSendToDLAOnNoRoute());
assertEquals(addressFullMessagePolicy, info.getAddressFullMessagePolicy());
+
+ serverControl.addAddressSettings(addressMatch,
+ DLA,
+ expiryAddress,
+ lastValueQueue,
+ deliveryAttempts,
+ -1,
+ 1000,
+ pageMaxCacheSize,
+ redeliveryDelay,
+ redistributionDelay,
+ sendToDLAOnNoRoute,
+ addressFullMessagePolicy);
+
+
+ jsonString = serverControl.getAddressSettingsAsJSON(exactAddress);
+ info = AddressSettingsInfo.from(jsonString);
+
+ assertEquals(DLA, info.getDeadLetterAddress());
+ assertEquals(expiryAddress, info.getExpiryAddress());
+ assertEquals(lastValueQueue, info.isLastValueQueue());
+ assertEquals(deliveryAttempts, info.getMaxDeliveryAttempts());
+ assertEquals(-1, info.getMaxSizeBytes());
+ assertEquals(pageMaxCacheSize, info.getPageCacheMaxSize());
+ assertEquals(1000, info.getPageSizeBytes());
+ assertEquals(redeliveryDelay, info.getRedeliveryDelay());
+ assertEquals(redistributionDelay, info.getRedistributionDelay());
+ assertEquals(sendToDLAOnNoRoute, info.isSendToDLAOnNoRoute());
+ assertEquals(addressFullMessagePolicy, info.getAddressFullMessagePolicy());
+
+
+
}
public void testCreateAndDestroyDivert() throws Exception
Show replies by date