[hornetq-commits] JBoss hornetq SVN: r9974 - trunk/tests/src/org/hornetq/tests/integration/server.
do-not-reply at jboss.org
do-not-reply at jboss.org
Thu Dec 2 03:30:23 EST 2010
Author: ataylor
Date: 2010-12-02 03:30:22 -0500 (Thu, 02 Dec 2010)
New Revision: 9974
Modified:
trunk/tests/src/org/hornetq/tests/integration/server/LVQRecoveryTest.java
Log:
tidy up resoucres correctly
Modified: trunk/tests/src/org/hornetq/tests/integration/server/LVQRecoveryTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/server/LVQRecoveryTest.java 2010-12-02 08:25:25 UTC (rev 9973)
+++ trunk/tests/src/org/hornetq/tests/integration/server/LVQRecoveryTest.java 2010-12-02 08:30:22 UTC (rev 9974)
@@ -46,6 +46,7 @@
private Configuration configuration;
private AddressSettings qs;
+ private ServerLocator locator;
public void testMultipleMessagesAfterRecovery() throws Exception
{
@@ -180,6 +181,10 @@
//
}
}
+ if(locator != null)
+ {
+ locator.close();
+ }
if (server != null && server.isStarted())
{
try
@@ -213,7 +218,7 @@
qs.setLastValueQueue(true);
server.getAddressSettingsRepository().addMatch(address.toString(), qs);
// then we create a client as normal
- ServerLocator locator = HornetQClient.createServerLocatorWithoutHA(new TransportConfiguration(ServiceTestBase.INVM_CONNECTOR_FACTORY));
+ locator = HornetQClient.createServerLocatorWithoutHA(new TransportConfiguration(ServiceTestBase.INVM_CONNECTOR_FACTORY));
locator.setBlockOnAcknowledge(true);
locator.setAckBatchSize(0);
@@ -236,7 +241,8 @@
qs.setLastValueQueue(true);
server.getAddressSettingsRepository().addMatch(address.toString(), qs);
// then we create a client as normal
- ServerLocator locator = HornetQClient.createServerLocatorWithoutHA(new TransportConfiguration(ServiceTestBase.INVM_CONNECTOR_FACTORY));
+ locator.close();
+ locator = HornetQClient.createServerLocatorWithoutHA(new TransportConfiguration(ServiceTestBase.INVM_CONNECTOR_FACTORY));
locator.setBlockOnAcknowledge(true);
locator.setAckBatchSize(0);
More information about the hornetq-commits
mailing list