Author: borges
Date: 2011-12-06 10:52:32 -0500 (Tue, 06 Dec 2011)
New Revision: 11862
Modified:
trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/client/DeadLetterAddressTest.java
trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/client/ExpiryAddressTest.java
trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/client/IncompatibleVersionTest.java
Log:
Fix tests broken during refactoring of tearDown()
Modified:
trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/client/DeadLetterAddressTest.java
===================================================================
---
trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/client/DeadLetterAddressTest.java 2011-12-06
15:02:45 UTC (rev 11861)
+++
trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/client/DeadLetterAddressTest.java 2011-12-06
15:52:32 UTC (rev 11862)
@@ -34,6 +34,7 @@
import org.hornetq.core.config.Configuration;
import org.hornetq.core.logging.Logger;
import org.hornetq.core.server.HornetQServer;
+import org.hornetq.core.server.HornetQServers;
import org.hornetq.core.server.Queue;
import org.hornetq.core.settings.impl.AddressSettings;
import org.hornetq.tests.util.RandomUtil;
@@ -48,6 +49,7 @@
private static final Logger log = Logger.getLogger(DeadLetterAddressTest.class);
private HornetQServer server;
+
private ClientSession clientSession;
private ServerLocator locator;
@@ -249,7 +251,7 @@
clientSession.createQueue(dla, dlq, null, false);
clientSession.createQueue(qName, qName, null, false);
ServerLocator locator = HornetQClient.createServerLocatorWithoutHA(new
TransportConfiguration(UnitTestCase.INVM_CONNECTOR_FACTORY));
- ClientSessionFactory sessionFactory = createSessionFactory(locator);
+ ClientSessionFactory sessionFactory = locator.createSessionFactory();
ClientSession sendSession = sessionFactory.createSession(false, true, true);
ClientProducer producer = sendSession.createProducer(qName);
Map<String, Long> origIds = new HashMap<String, Long>();
@@ -468,7 +470,8 @@
configuration.setSecurityEnabled(false);
TransportConfiguration transportConfig = new
TransportConfiguration(UnitTestCase.INVM_ACCEPTOR_FACTORY);
configuration.getAcceptorConfigurations().add(transportConfig);
- server = createServer(false, configuration);
+ server = addServer(HornetQServers.newHornetQServer(configuration, false));
+ // start the server
server.start();
// then we create a client as normal
locator =
Modified:
trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/client/ExpiryAddressTest.java
===================================================================
---
trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/client/ExpiryAddressTest.java 2011-12-06
15:02:45 UTC (rev 11861)
+++
trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/client/ExpiryAddressTest.java 2011-12-06
15:52:32 UTC (rev 11862)
@@ -27,6 +27,7 @@
import org.hornetq.core.config.Configuration;
import org.hornetq.core.logging.Logger;
import org.hornetq.core.server.HornetQServer;
+import org.hornetq.core.server.HornetQServers;
import org.hornetq.core.settings.impl.AddressSettings;
import org.hornetq.tests.util.RandomUtil;
import org.hornetq.tests.util.ServiceTestBase;
@@ -313,7 +314,7 @@
configuration.setSecurityEnabled(false);
TransportConfiguration transportConfig = new
TransportConfiguration(UnitTestCase.INVM_ACCEPTOR_FACTORY);
configuration.getAcceptorConfigurations().add(transportConfig);
- server = createServer(false, configuration);
+ server = addServer(HornetQServers.newHornetQServer(configuration, false));
// start the server
server.start();
// then we create a client as normal
Modified:
trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/client/IncompatibleVersionTest.java
===================================================================
---
trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/client/IncompatibleVersionTest.java 2011-12-06
15:02:45 UTC (rev 11861)
+++
trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/client/IncompatibleVersionTest.java 2011-12-06
15:52:32 UTC (rev 11862)
@@ -83,7 +83,11 @@
protected void tearDown() throws Exception
{
connection.destroy();
- super.tearDown();
+
+ locator.close();
+
+ server.stop();
+ // You CANNOT CALL super.tearDown();
}
public void testCompatibleClientVersion() throws Exception
Show replies by date