Author: borges
Date: 2011-12-08 11:37:18 -0500 (Thu, 08 Dec 2011)
New Revision: 11879
Modified:
trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/distribution/SymmetricClusterTest.java
trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/management/SecurityManagementTestBase.java
trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/management/SecurityManagementWithConfiguredAdminUserTest.java
trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/management/SecurityManagementWithDefaultConfigurationTest.java
Log:
Improve tearDown.
Modified:
trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/distribution/SymmetricClusterTest.java
===================================================================
---
trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/distribution/SymmetricClusterTest.java 2011-12-08
12:41:42 UTC (rev 11878)
+++
trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/distribution/SymmetricClusterTest.java 2011-12-08
16:37:18 UTC (rev 11879)
@@ -39,6 +39,15 @@
setupServers();
}
+ @Override
+ protected void tearDown() throws Exception
+ {
+ log.info("#test tearDown");
+ stopServers();
+
+ super.tearDown();
+ }
+
protected boolean isNetty()
{
return false;
Modified:
trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/management/SecurityManagementTestBase.java
===================================================================
---
trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/management/SecurityManagementTestBase.java 2011-12-08
12:41:42 UTC (rev 11878)
+++
trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/management/SecurityManagementTestBase.java 2011-12-08
16:37:18 UTC (rev 11879)
@@ -16,11 +16,15 @@
import junit.framework.Assert;
import org.hornetq.api.core.TransportConfiguration;
-import org.hornetq.api.core.client.*;
+import org.hornetq.api.core.client.ClientMessage;
+import org.hornetq.api.core.client.ClientRequestor;
+import org.hornetq.api.core.client.ClientSession;
+import org.hornetq.api.core.client.ClientSessionFactory;
+import org.hornetq.api.core.client.HornetQClient;
+import org.hornetq.api.core.client.ServerLocator;
import org.hornetq.api.core.management.ManagementHelper;
import org.hornetq.api.core.management.ResourceNames;
import org.hornetq.core.config.impl.ConfigurationImpl;
-import org.hornetq.core.remoting.impl.invm.InVMConnectorFactory;
import org.hornetq.core.server.HornetQServer;
import org.hornetq.tests.util.UnitTestCase;
@@ -71,7 +75,9 @@
protected void doSendManagementMessage(final String user, final String password, final
boolean expectSuccess) throws Exception
{
- ServerLocator locator = HornetQClient.createServerLocatorWithoutHA(new
TransportConfiguration(UnitTestCase.INVM_CONNECTOR_FACTORY));
+ ServerLocator locator =
+ addServerLocator(HornetQClient.createServerLocatorWithoutHA(new
TransportConfiguration(
+
UnitTestCase.INVM_CONNECTOR_FACTORY)));
ClientSessionFactory sf = locator.createSessionFactory();
try
{
@@ -112,6 +118,10 @@
e.printStackTrace();
}
}
+ finally
+ {
+ sf.close();
+ }
}
// Private -------------------------------------------------------
Modified:
trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/management/SecurityManagementWithConfiguredAdminUserTest.java
===================================================================
---
trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/management/SecurityManagementWithConfiguredAdminUserTest.java 2011-12-08
12:41:42 UTC (rev 11878)
+++
trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/management/SecurityManagementWithConfiguredAdminUserTest.java 2011-12-08
16:37:18 UTC (rev 11879)
@@ -86,7 +86,7 @@
Configuration conf = createBasicConfig();
conf.setSecurityEnabled(true);
conf.getAcceptorConfigurations().add(new
TransportConfiguration(InVMAcceptorFactory.class.getName()));
- HornetQServer server = HornetQServers.newHornetQServer(conf, false);
+ HornetQServer server = addServer(HornetQServers.newHornetQServer(conf, false));
server.start();
HierarchicalRepository<Set<Role>> securityRepository =
server.getSecurityRepository();
HornetQSecurityManagerImpl securityManager =
(HornetQSecurityManagerImpl)server.getSecurityManager();
Modified:
trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/management/SecurityManagementWithDefaultConfigurationTest.java
===================================================================
---
trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/management/SecurityManagementWithDefaultConfigurationTest.java 2011-12-08
12:41:42 UTC (rev 11878)
+++
trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/management/SecurityManagementWithDefaultConfigurationTest.java 2011-12-08
16:37:18 UTC (rev 11879)
@@ -56,7 +56,7 @@
conf.setClusterPassword(ConfigurationImpl.DEFAULT_CLUSTER_PASSWORD);
conf.setSecurityEnabled(true);
conf.getAcceptorConfigurations().add(new
TransportConfiguration(InVMAcceptorFactory.class.getName()));
- HornetQServer server = HornetQServers.newHornetQServer(conf, false);
+ HornetQServer server = addServer(HornetQServers.newHornetQServer(conf, false));
server.start();
return server;
Show replies by date