activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From andytay...@apache.org
Subject [06/13] activemq-artemis git commit: Refactor base test classes
Date Wed, 20 May 2015 09:47:11 GMT
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/99147d07/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/RequestorTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/RequestorTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/RequestorTest.java
index 892b585..fea0f95 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/RequestorTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/RequestorTest.java
@@ -27,7 +27,6 @@ import org.apache.activemq.artemis.api.core.client.ClientSession;
 import org.apache.activemq.artemis.api.core.client.ClientSessionFactory;
 import org.apache.activemq.artemis.api.core.client.MessageHandler;
 import org.apache.activemq.artemis.api.core.client.ServerLocator;
-import org.apache.activemq.artemis.tests.util.UnitTestCase;
 import org.apache.activemq.artemis.core.client.impl.ClientMessageImpl;
 import org.apache.activemq.artemis.core.config.Configuration;
 import org.apache.activemq.artemis.core.server.ActiveMQServer;
@@ -214,7 +213,7 @@ public class RequestorTest extends ServiceTestBase
          }
       };
 
-      UnitTestCase.expectActiveMQException("ClientRequestor's session must not be closed",
+      ServiceTestBase.expectActiveMQException("ClientRequestor's session must not be closed",
               ActiveMQExceptionType.OBJECT_CLOSED,
               activeMQAction);
    }
@@ -258,7 +257,7 @@ public class RequestorTest extends ServiceTestBase
          }
       };
 
-      UnitTestCase.expectActiveMQException("can not send a request on a closed ClientRequestor",
+      ServiceTestBase.expectActiveMQException("can not send a request on a closed ClientRequestor",
                                            ActiveMQExceptionType.OBJECT_CLOSED, activeMQAction);
    }
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/99147d07/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/SelfExpandingBufferTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/SelfExpandingBufferTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/SelfExpandingBufferTest.java
index 0ce600d..23814fa 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/SelfExpandingBufferTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/SelfExpandingBufferTest.java
@@ -24,11 +24,10 @@ import org.apache.activemq.artemis.api.core.client.ClientProducer;
 import org.apache.activemq.artemis.api.core.client.ClientSession;
 import org.apache.activemq.artemis.api.core.client.ClientSessionFactory;
 import org.apache.activemq.artemis.api.core.client.ServerLocator;
-import org.apache.activemq.artemis.tests.integration.IntegrationTestLogger;
-import org.apache.activemq.artemis.tests.util.ServiceTestBase;
-import org.apache.activemq.artemis.tests.util.UnitTestCase;
 import org.apache.activemq.artemis.core.server.ActiveMQServer;
+import org.apache.activemq.artemis.tests.integration.IntegrationTestLogger;
 import org.apache.activemq.artemis.tests.util.RandomUtil;
+import org.apache.activemq.artemis.tests.util.ServiceTestBase;
 import org.junit.Assert;
 import org.junit.Test;
 
@@ -118,7 +117,7 @@ public class SelfExpandingBufferTest extends ServiceTestBase
 
          msg2.getBodyBuffer().readBytes(receivedBytes);
 
-         UnitTestCase.assertEqualsByteArrays(bytes, receivedBytes);
+         ServiceTestBase.assertEqualsByteArrays(bytes, receivedBytes);
 
          msg2 = cons.receive(3000);
 
@@ -126,7 +125,7 @@ public class SelfExpandingBufferTest extends ServiceTestBase
 
          msg2.getBodyBuffer().readBytes(receivedBytes);
 
-         UnitTestCase.assertEqualsByteArrays(bytes, receivedBytes);
+         ServiceTestBase.assertEqualsByteArrays(bytes, receivedBytes);
       }
       finally
       {

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/99147d07/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/SessionCloseOnGCTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/SessionCloseOnGCTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/SessionCloseOnGCTest.java
index 372a8fd..debde03 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/SessionCloseOnGCTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/SessionCloseOnGCTest.java
@@ -16,19 +16,18 @@
  */
 package org.apache.activemq.artemis.tests.integration.client;
 
-import java.lang.ref.WeakReference;
-
 import org.apache.activemq.artemis.api.core.client.ClientSession;
 import org.apache.activemq.artemis.api.core.client.ClientSessionFactory;
 import org.apache.activemq.artemis.api.core.client.ServerLocator;
-import org.apache.activemq.artemis.tests.util.ServiceTestBase;
-import org.apache.activemq.artemis.tests.util.UnitTestCase;
 import org.apache.activemq.artemis.core.client.impl.ClientSessionFactoryImpl;
 import org.apache.activemq.artemis.core.server.ActiveMQServer;
+import org.apache.activemq.artemis.tests.util.ServiceTestBase;
 import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Test;
 
+import java.lang.ref.WeakReference;
+
 public class SessionCloseOnGCTest extends ServiceTestBase
 {
    private ActiveMQServer server;
@@ -70,7 +69,7 @@ public class SessionCloseOnGCTest extends ServiceTestBase
       locator.close();
 
       locator = null;
-      UnitTestCase.checkWeakReferences(wrs1, wrs2);
+      ServiceTestBase.checkWeakReferences(wrs1, wrs2);
 
       WeakReference<ClientSessionFactory> fref = new WeakReference<ClientSessionFactory>(factory);
 
@@ -78,7 +77,7 @@ public class SessionCloseOnGCTest extends ServiceTestBase
 
       factory = null;
 
-      UnitTestCase.checkWeakReferences(fref, wrs1, wrs2);
+      ServiceTestBase.checkWeakReferences(fref, wrs1, wrs2);
    }
 
    @Test
@@ -103,7 +102,7 @@ public class SessionCloseOnGCTest extends ServiceTestBase
       locator.close();
 
       locator = null;
-      UnitTestCase.checkWeakReferences(wrs1, wrs2);
+      ServiceTestBase.checkWeakReferences(wrs1, wrs2);
 
       WeakReference<ClientSessionFactory> fref = new WeakReference<ClientSessionFactory>(factory);
 
@@ -111,7 +110,7 @@ public class SessionCloseOnGCTest extends ServiceTestBase
 
       factory = null;
 
-      UnitTestCase.checkWeakReferences(fref, wrs1, wrs2);
+      ServiceTestBase.checkWeakReferences(fref, wrs1, wrs2);
    }
 
    @Test
@@ -134,13 +133,13 @@ public class SessionCloseOnGCTest extends ServiceTestBase
       locator.close();
 
       locator = null;
-      UnitTestCase.checkWeakReferences(wrs1, wrs2);
+      ServiceTestBase.checkWeakReferences(wrs1, wrs2);
 
       WeakReference<ClientSessionFactory> fref = new WeakReference<ClientSessionFactory>(factory);
 
       factory = null;
 
-      UnitTestCase.checkWeakReferences(fref, wrs1, wrs2);
+      ServiceTestBase.checkWeakReferences(fref, wrs1, wrs2);
    }
 
    @Test
@@ -160,13 +159,13 @@ public class SessionCloseOnGCTest extends ServiceTestBase
       locator.close();
 
       locator = null;
-      UnitTestCase.checkWeakReferences(wrs1, wrs2);
+      ServiceTestBase.checkWeakReferences(wrs1, wrs2);
 
       WeakReference<ClientSessionFactory> fref = new WeakReference<ClientSessionFactory>(factory);
 
       factory = null;
 
-      UnitTestCase.checkWeakReferences(fref, wrs1, wrs2);
+      ServiceTestBase.checkWeakReferences(fref, wrs1, wrs2);
    }
 
    @Test
@@ -181,7 +180,7 @@ public class SessionCloseOnGCTest extends ServiceTestBase
       locator.close();
 
       locator = null;
-      UnitTestCase.checkWeakReferences(fref);
+      ServiceTestBase.checkWeakReferences(fref);
    }
 
    @Test
@@ -197,7 +196,7 @@ public class SessionCloseOnGCTest extends ServiceTestBase
 
       session = null;
 
-      UnitTestCase.checkWeakReferences(wses);
+      ServiceTestBase.checkWeakReferences(wses);
 
       Assert.assertEquals(0, sf.numSessions());
       Assert.assertEquals(1, sf.numConnections());
@@ -223,7 +222,7 @@ public class SessionCloseOnGCTest extends ServiceTestBase
       session2 = null;
       session3 = null;
 
-      UnitTestCase.checkWeakReferences(ref1, ref2, ref3);
+      ServiceTestBase.checkWeakReferences(ref1, ref2, ref3);
 
       int count = 0;
       final int TOTAL_SLEEP_TIME = 400;

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/99147d07/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/SessionCloseTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/SessionCloseTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/SessionCloseTest.java
index 397556d..060d38b 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/SessionCloseTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/SessionCloseTest.java
@@ -15,34 +15,31 @@
  * limitations under the License.
  */
 package org.apache.activemq.artemis.tests.integration.client;
+
 import org.apache.activemq.artemis.api.core.ActiveMQException;
 import org.apache.activemq.artemis.api.core.ActiveMQExceptionType;
-import org.apache.activemq.artemis.tests.util.UnitTestCase;
-import org.junit.Before;
-import org.junit.After;
-
-import org.junit.Test;
-
-import javax.transaction.xa.XAException;
-import javax.transaction.xa.XAResource;
-
-import org.junit.Assert;
-
 import org.apache.activemq.artemis.api.core.SimpleString;
 import org.apache.activemq.artemis.api.core.TransportConfiguration;
 import org.apache.activemq.artemis.api.core.client.ClientConsumer;
 import org.apache.activemq.artemis.api.core.client.ClientProducer;
 import org.apache.activemq.artemis.api.core.client.ClientSession;
 import org.apache.activemq.artemis.api.core.client.ClientSessionFactory;
-import org.apache.activemq.artemis.api.core.client.ActiveMQClient;
 import org.apache.activemq.artemis.api.core.client.ServerLocator;
 import org.apache.activemq.artemis.core.config.Configuration;
 import org.apache.activemq.artemis.core.remoting.impl.invm.InVMAcceptorFactory;
 import org.apache.activemq.artemis.core.server.ActiveMQServer;
 import org.apache.activemq.artemis.core.server.ActiveMQServers;
 import org.apache.activemq.artemis.tests.util.RandomUtil;
+import org.apache.activemq.artemis.tests.util.ServiceTestBase;
+import org.junit.After;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+
+import javax.transaction.xa.XAException;
+import javax.transaction.xa.XAResource;
 
-public class SessionCloseTest extends UnitTestCase
+public class SessionCloseTest extends ServiceTestBase
 {
 
    // Constants -----------------------------------------------------
@@ -69,7 +66,7 @@ public class SessionCloseTest extends UnitTestCase
 
       Assert.assertTrue(session.isClosed());
 
-      UnitTestCase.expectActiveMQException(ActiveMQExceptionType.OBJECT_CLOSED, new ActiveMQAction()
+      ServiceTestBase.expectActiveMQException(ActiveMQExceptionType.OBJECT_CLOSED, new ActiveMQAction()
       {
          public void run() throws ActiveMQException
          {
@@ -77,7 +74,7 @@ public class SessionCloseTest extends UnitTestCase
          }
       });
 
-      UnitTestCase.expectActiveMQException(ActiveMQExceptionType.OBJECT_CLOSED, new ActiveMQAction()
+      ServiceTestBase.expectActiveMQException(ActiveMQExceptionType.OBJECT_CLOSED, new ActiveMQAction()
       {
          public void run() throws ActiveMQException
          {
@@ -85,7 +82,7 @@ public class SessionCloseTest extends UnitTestCase
          }
       });
 
-      UnitTestCase.expectActiveMQException(ActiveMQExceptionType.OBJECT_CLOSED, new ActiveMQAction()
+      ServiceTestBase.expectActiveMQException(ActiveMQExceptionType.OBJECT_CLOSED, new ActiveMQAction()
       {
          public void run() throws ActiveMQException
          {
@@ -95,7 +92,7 @@ public class SessionCloseTest extends UnitTestCase
          }
       });
 
-      UnitTestCase.expectActiveMQException(ActiveMQExceptionType.OBJECT_CLOSED, new ActiveMQAction()
+      ServiceTestBase.expectActiveMQException(ActiveMQExceptionType.OBJECT_CLOSED, new ActiveMQAction()
       {
          public void run() throws ActiveMQException
          {
@@ -103,7 +100,7 @@ public class SessionCloseTest extends UnitTestCase
          }
       });
 
-      UnitTestCase.expectActiveMQException(ActiveMQExceptionType.OBJECT_CLOSED, new ActiveMQAction()
+      ServiceTestBase.expectActiveMQException(ActiveMQExceptionType.OBJECT_CLOSED, new ActiveMQAction()
       {
          public void run() throws ActiveMQException
          {
@@ -111,7 +108,7 @@ public class SessionCloseTest extends UnitTestCase
          }
       });
 
-      UnitTestCase.expectActiveMQException(ActiveMQExceptionType.OBJECT_CLOSED, new ActiveMQAction()
+      ServiceTestBase.expectActiveMQException(ActiveMQExceptionType.OBJECT_CLOSED, new ActiveMQAction()
       {
          public void run() throws ActiveMQException
          {
@@ -119,7 +116,7 @@ public class SessionCloseTest extends UnitTestCase
          }
       });
 
-      UnitTestCase.expectActiveMQException(ActiveMQExceptionType.OBJECT_CLOSED, new ActiveMQAction()
+      ServiceTestBase.expectActiveMQException(ActiveMQExceptionType.OBJECT_CLOSED, new ActiveMQAction()
       {
          public void run() throws ActiveMQException
          {
@@ -127,7 +124,7 @@ public class SessionCloseTest extends UnitTestCase
          }
       });
 
-      UnitTestCase.expectActiveMQException(ActiveMQExceptionType.OBJECT_CLOSED, new ActiveMQAction()
+      ServiceTestBase.expectActiveMQException(ActiveMQExceptionType.OBJECT_CLOSED, new ActiveMQAction()
       {
          public void run() throws ActiveMQException
          {
@@ -135,7 +132,7 @@ public class SessionCloseTest extends UnitTestCase
          }
       });
 
-      UnitTestCase.expectActiveMQException(ActiveMQExceptionType.OBJECT_CLOSED, new ActiveMQAction()
+      ServiceTestBase.expectActiveMQException(ActiveMQExceptionType.OBJECT_CLOSED, new ActiveMQAction()
       {
          public void run() throws ActiveMQException
          {
@@ -143,7 +140,7 @@ public class SessionCloseTest extends UnitTestCase
          }
       });
 
-      UnitTestCase.expectActiveMQException(ActiveMQExceptionType.OBJECT_CLOSED, new ActiveMQAction()
+      ServiceTestBase.expectActiveMQException(ActiveMQExceptionType.OBJECT_CLOSED, new ActiveMQAction()
       {
          public void run() throws ActiveMQException
          {
@@ -164,7 +161,7 @@ public class SessionCloseTest extends UnitTestCase
       Assert.assertTrue(session.isXA());
       Assert.assertTrue(session.isClosed());
 
-      UnitTestCase.expectXAException(XAException.XA_RETRY, new ActiveMQAction()
+      ServiceTestBase.expectXAException(XAException.XA_RETRY, new ActiveMQAction()
       {
          public void run() throws XAException
          {
@@ -172,7 +169,7 @@ public class SessionCloseTest extends UnitTestCase
          }
       });
 
-      UnitTestCase.expectXAException(XAException.XAER_RMERR, new ActiveMQAction()
+      ServiceTestBase.expectXAException(XAException.XAER_RMERR, new ActiveMQAction()
       {
          public void run() throws XAException
          {
@@ -180,7 +177,7 @@ public class SessionCloseTest extends UnitTestCase
          }
       });
 
-      UnitTestCase.expectXAException(XAException.XAER_RMERR, new ActiveMQAction()
+      ServiceTestBase.expectXAException(XAException.XAER_RMERR, new ActiveMQAction()
       {
          public void run() throws XAException
          {
@@ -188,7 +185,7 @@ public class SessionCloseTest extends UnitTestCase
          }
       });
 
-      UnitTestCase.expectXAException(XAException.XAER_RMERR, new ActiveMQAction()
+      ServiceTestBase.expectXAException(XAException.XAER_RMERR, new ActiveMQAction()
       {
          public void run() throws XAException
          {
@@ -196,7 +193,7 @@ public class SessionCloseTest extends UnitTestCase
          }
       });
 
-      UnitTestCase.expectXAException(XAException.XAER_RMERR, new ActiveMQAction()
+      ServiceTestBase.expectXAException(XAException.XAER_RMERR, new ActiveMQAction()
       {
          public void run() throws XAException
          {
@@ -204,7 +201,7 @@ public class SessionCloseTest extends UnitTestCase
          }
       });
 
-      UnitTestCase.expectXAException(XAException.XAER_RMERR, new ActiveMQAction()
+      ServiceTestBase.expectXAException(XAException.XAER_RMERR, new ActiveMQAction()
       {
          public void run() throws XAException
          {
@@ -212,7 +209,7 @@ public class SessionCloseTest extends UnitTestCase
          }
       });
 
-      UnitTestCase.expectXAException(XAException.XAER_RMERR, new ActiveMQAction()
+      ServiceTestBase.expectXAException(XAException.XAER_RMERR, new ActiveMQAction()
       {
          public void run() throws XAException
          {
@@ -260,7 +257,7 @@ public class SessionCloseTest extends UnitTestCase
 
       server.start();
 
-      ServerLocator locator = ActiveMQClient.createServerLocatorWithoutHA(new TransportConfiguration(UnitTestCase.INVM_CONNECTOR_FACTORY));
+      ServerLocator locator = createInVMNonHALocator();
       sf = createSessionFactory(locator);
 
    }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/99147d07/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/TemporaryQueueTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/TemporaryQueueTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/TemporaryQueueTest.java
index f1f75b6..add2724 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/TemporaryQueueTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/TemporaryQueueTest.java
@@ -37,7 +37,7 @@ import org.apache.activemq.artemis.api.core.client.ClientSessionFactory;
 import org.apache.activemq.artemis.api.core.client.MessageHandler;
 import org.apache.activemq.artemis.api.core.client.ServerLocator;
 import org.apache.activemq.artemis.tests.util.SingleServerTestBase;
-import org.apache.activemq.artemis.tests.util.UnitTestCase;
+import org.apache.activemq.artemis.tests.util.ServiceTestBase;
 import org.apache.activemq.artemis.core.client.impl.ClientProducerImpl;
 import org.apache.activemq.artemis.core.client.impl.ClientSessionInternal;
 import org.apache.activemq.artemis.core.protocol.core.Packet;
@@ -574,7 +574,7 @@ public class TemporaryQueueTest extends SingleServerTestBase
          }
       };
 
-      UnitTestCase.expectActiveMQException("temp queue must not exist after the server detected the client crash",
+      ServiceTestBase.expectActiveMQException("temp queue must not exist after the server detected the client crash",
               ActiveMQExceptionType.QUEUE_DOES_NOT_EXIST, activeMQAction);
 
       session.close();

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/99147d07/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/WildCardRoutingTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/WildCardRoutingTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/WildCardRoutingTest.java
index 17383c0..3ada09d 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/WildCardRoutingTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/WildCardRoutingTest.java
@@ -15,15 +15,8 @@
  * limitations under the License.
  */
 package org.apache.activemq.artemis.tests.integration.client;
-import org.apache.activemq.artemis.api.core.ActiveMQException;
-import org.apache.activemq.artemis.tests.util.UnitTestCase;
-import org.junit.Before;
-import org.junit.After;
-
-import org.junit.Test;
-
-import org.junit.Assert;
 
+import org.apache.activemq.artemis.api.core.ActiveMQException;
 import org.apache.activemq.artemis.api.core.SimpleString;
 import org.apache.activemq.artemis.api.core.TransportConfiguration;
 import org.apache.activemq.artemis.api.core.client.ClientConsumer;
@@ -31,13 +24,17 @@ import org.apache.activemq.artemis.api.core.client.ClientMessage;
 import org.apache.activemq.artemis.api.core.client.ClientProducer;
 import org.apache.activemq.artemis.api.core.client.ClientSession;
 import org.apache.activemq.artemis.api.core.client.ClientSessionFactory;
-import org.apache.activemq.artemis.api.core.client.ActiveMQClient;
 import org.apache.activemq.artemis.api.core.client.ServerLocator;
 import org.apache.activemq.artemis.core.config.Configuration;
 import org.apache.activemq.artemis.core.server.ActiveMQServer;
 import org.apache.activemq.artemis.core.server.ActiveMQServers;
+import org.apache.activemq.artemis.tests.util.ServiceTestBase;
+import org.junit.After;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
 
-public class WildCardRoutingTest extends UnitTestCase
+public class WildCardRoutingTest extends ServiceTestBase
 {
    private ActiveMQServer server;
    private ServerLocator locator;
@@ -784,7 +781,7 @@ public class WildCardRoutingTest extends UnitTestCase
    public void setUp() throws Exception
    {
       super.setUp();
-      TransportConfiguration transportConfig = new TransportConfiguration(UnitTestCase.INVM_ACCEPTOR_FACTORY);
+      TransportConfiguration transportConfig = new TransportConfiguration(ServiceTestBase.INVM_ACCEPTOR_FACTORY);
 
       Configuration configuration = createDefaultConfig()
          .setWildcardRoutingEnabled(true)
@@ -797,7 +794,7 @@ public class WildCardRoutingTest extends UnitTestCase
       server.start();
       server.getManagementService().enableNotifications(false);
       // then we create a client as normal
-      locator = ActiveMQClient.createServerLocatorWithoutHA(new TransportConfiguration(UnitTestCase.INVM_CONNECTOR_FACTORY));
+      locator = createInVMNonHALocator();
       sessionFactory = createSessionFactory(locator);
       clientSession = sessionFactory.createSession(false, true, true);
    }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/99147d07/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/ClusterControllerTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/ClusterControllerTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/ClusterControllerTest.java
index 12d3f16..23b73f4 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/ClusterControllerTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/ClusterControllerTest.java
@@ -17,13 +17,11 @@
 package org.apache.activemq.artemis.tests.integration.cluster;
 
 import org.apache.activemq.artemis.api.core.ActiveMQClusterSecurityException;
-import org.apache.activemq.artemis.api.core.TransportConfiguration;
-import org.apache.activemq.artemis.api.core.client.ActiveMQClient;
 import org.apache.activemq.artemis.core.client.impl.ClientSessionFactoryInternal;
 import org.apache.activemq.artemis.core.client.impl.ServerLocatorImpl;
+import org.apache.activemq.artemis.core.server.cluster.ActiveMQServerSideProtocolManagerFactory;
 import org.apache.activemq.artemis.core.server.cluster.ClusterControl;
 import org.apache.activemq.artemis.core.server.cluster.ClusterController;
-import org.apache.activemq.artemis.core.server.cluster.ActiveMQServerSideProtocolManagerFactory;
 import org.apache.activemq.artemis.tests.integration.cluster.distribution.ClusterTestBase;
 import org.junit.After;
 import org.junit.Before;
@@ -70,7 +68,7 @@ public class ClusterControllerTest extends ClusterTestBase
    @Test
    public void controlWithDifferentConnector() throws Exception
    {
-      try (ServerLocatorImpl locator = (ServerLocatorImpl) ActiveMQClient.createServerLocatorWithoutHA(new TransportConfiguration(INVM_CONNECTOR_FACTORY)))
+      try (ServerLocatorImpl locator = (ServerLocatorImpl) createInVMNonHALocator())
       {
          locator.setProtocolManagerFactory(ActiveMQServerSideProtocolManagerFactory.getInstance());
          ClusterController controller = new ClusterController(getServer(0), getServer(0).getScheduledPool());
@@ -82,7 +80,7 @@ public class ClusterControllerTest extends ClusterTestBase
    @Test
    public void controlWithDifferentPassword() throws Exception
    {
-      try (ServerLocatorImpl locator = (ServerLocatorImpl) ActiveMQClient.createServerLocatorWithoutHA(new TransportConfiguration(INVM_CONNECTOR_FACTORY)))
+      try (ServerLocatorImpl locator = (ServerLocatorImpl) createInVMNonHALocator())
       {
          locator.setProtocolManagerFactory(ActiveMQServerSideProtocolManagerFactory.getInstance());
          ClusterController controller = new ClusterController(getServer(1), getServer(1).getScheduledPool());

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/99147d07/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/RealNodeManagerTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/RealNodeManagerTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/RealNodeManagerTest.java
index a6ccc05..d81abcd 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/RealNodeManagerTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/RealNodeManagerTest.java
@@ -20,7 +20,7 @@ import java.util.ArrayList;
 import java.util.List;
 
 import org.apache.activemq.artemis.tests.util.SpawnedVMSupport;
-import org.apache.activemq.artemis.tests.util.UnitTestCase;
+import org.apache.activemq.artemis.tests.util.ServiceTestBase;
 import org.apache.activemq.artemis.core.server.NodeManager;
 import org.apache.activemq.artemis.core.server.impl.FileLockNodeManager;
 import org.apache.activemq.artemis.utils.UUID;
@@ -37,7 +37,7 @@ public class RealNodeManagerTest extends NodeManagerTest
       UUID id1 = nodeManager.getUUID();
       nodeManager.stop();
       nodeManager.start();
-      UnitTestCase.assertEqualsByteArrays(id1.asBytes(), nodeManager.getUUID().asBytes());
+      ServiceTestBase.assertEqualsByteArrays(id1.asBytes(), nodeManager.getUUID().asBytes());
       nodeManager.stop();
    }
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/99147d07/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/bridge/BridgeTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/bridge/BridgeTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/bridge/BridgeTest.java
index 61e6f3b..219429a 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/bridge/BridgeTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/bridge/BridgeTest.java
@@ -16,33 +16,27 @@
  */
 package org.apache.activemq.artemis.tests.integration.cluster.bridge;
 
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.Semaphore;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.atomic.AtomicInteger;
-
 import org.apache.activemq.artemis.api.core.ActiveMQBuffer;
 import org.apache.activemq.artemis.api.core.ActiveMQException;
 import org.apache.activemq.artemis.api.core.Interceptor;
 import org.apache.activemq.artemis.api.core.SimpleString;
 import org.apache.activemq.artemis.api.core.TransportConfiguration;
+import org.apache.activemq.artemis.api.core.client.ActiveMQClient;
 import org.apache.activemq.artemis.api.core.client.ClientConsumer;
 import org.apache.activemq.artemis.api.core.client.ClientMessage;
 import org.apache.activemq.artemis.api.core.client.ClientProducer;
 import org.apache.activemq.artemis.api.core.client.ClientSession;
 import org.apache.activemq.artemis.api.core.client.ClientSessionFactory;
-import org.apache.activemq.artemis.api.core.client.ActiveMQClient;
 import org.apache.activemq.artemis.api.core.client.ServerLocator;
-import org.apache.activemq.artemis.tests.integration.IntegrationTestLogger;
-import org.apache.activemq.artemis.tests.util.UnitTestCase;
 import org.apache.activemq.artemis.core.config.BridgeConfiguration;
 import org.apache.activemq.artemis.core.config.CoreQueueConfiguration;
+import org.apache.activemq.artemis.core.journal.PreparedTransactionInfo;
+import org.apache.activemq.artemis.core.journal.RecordInfo;
+import org.apache.activemq.artemis.core.journal.SequentialFileFactory;
+import org.apache.activemq.artemis.core.journal.impl.JournalImpl;
+import org.apache.activemq.artemis.core.journal.impl.NIOSequentialFileFactory;
+import org.apache.activemq.artemis.core.persistence.impl.journal.DescribeJournal;
+import org.apache.activemq.artemis.core.persistence.impl.journal.JournalRecordIds;
 import org.apache.activemq.artemis.core.postoffice.DuplicateIDCache;
 import org.apache.activemq.artemis.core.postoffice.impl.PostOfficeImpl;
 import org.apache.activemq.artemis.core.protocol.core.Packet;
@@ -56,6 +50,7 @@ import org.apache.activemq.artemis.core.server.Queue;
 import org.apache.activemq.artemis.core.server.cluster.impl.BridgeImpl;
 import org.apache.activemq.artemis.core.transaction.impl.TransactionImpl;
 import org.apache.activemq.artemis.spi.core.protocol.RemotingConnection;
+import org.apache.activemq.artemis.tests.integration.IntegrationTestLogger;
 import org.apache.activemq.artemis.tests.util.RandomUtil;
 import org.apache.activemq.artemis.tests.util.ServiceTestBase;
 import org.apache.activemq.artemis.utils.LinkedListIterator;
@@ -66,6 +61,18 @@ import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.junit.runners.Parameterized;
 
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.Semaphore;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.atomic.AtomicInteger;
+
 @RunWith(value = Parameterized.class)
 public class BridgeTest extends ServiceTestBase
 {
@@ -226,7 +233,7 @@ public class BridgeTest extends ServiceTestBase
 
          if (largeMessage)
          {
-            message.setBodyInputStream(UnitTestCase.createFakeLargeStream(1024 * 1024));
+            message.setBodyInputStream(ServiceTestBase.createFakeLargeStream(1024 * 1024));
          }
 
          message.putIntProperty(propKey, i);
@@ -403,7 +410,7 @@ public class BridgeTest extends ServiceTestBase
 
          if (largeMessage)
          {
-            message.setBodyInputStream(UnitTestCase.createFakeLargeStream(1024 * 1024));
+            message.setBodyInputStream(ServiceTestBase.createFakeLargeStream(1024 * 1024));
          }
 
          message.putIntProperty(propKey, i);
@@ -588,7 +595,7 @@ public class BridgeTest extends ServiceTestBase
 
          if (largeMessage)
          {
-            message.setBodyInputStream(UnitTestCase.createFakeLargeStream(1024 * 1024));
+            message.setBodyInputStream(ServiceTestBase.createFakeLargeStream(1024 * 1024));
          }
 
          producer0.send(message);
@@ -606,7 +613,7 @@ public class BridgeTest extends ServiceTestBase
 
          if (largeMessage)
          {
-            message.setBodyInputStream(UnitTestCase.createFakeLargeStream(1024 * 1024));
+            message.setBodyInputStream(ServiceTestBase.createFakeLargeStream(1024 * 1024));
          }
 
          producer0.send(message);
@@ -1869,4 +1876,59 @@ public class BridgeTest extends ServiceTestBase
 
 
    }
+
+   /**
+    * It will inspect the journal directly and determine if there are queues on this journal,
+    *
+    * @param serverToInvestigate
+    * @return a Map containing the reference counts per queue
+    * @throws Exception
+    */
+   protected Map<Long, AtomicInteger> loadQueues(ActiveMQServer serverToInvestigate) throws Exception
+   {
+      SequentialFileFactory messagesFF = new NIOSequentialFileFactory(serverToInvestigate.getConfiguration()
+                                                                              .getJournalDirectory());
+
+      JournalImpl messagesJournal = new JournalImpl(serverToInvestigate.getConfiguration().getJournalFileSize(),
+                                                    serverToInvestigate.getConfiguration().getJournalMinFiles(),
+                                                    0,
+                                                    0,
+                                                    messagesFF,
+                                                    "activemq-data",
+                                                    "amq",
+                                                    1);
+      List<RecordInfo> records = new LinkedList<RecordInfo>();
+
+      List<PreparedTransactionInfo> preparedTransactions = new LinkedList<PreparedTransactionInfo>();
+
+      messagesJournal.start();
+      messagesJournal.load(records, preparedTransactions, null);
+
+      // These are more immutable integers
+      Map<Long, AtomicInteger> messageRefCounts = new HashMap<Long, AtomicInteger>();
+
+      for (RecordInfo info : records)
+      {
+         Object o = DescribeJournal.newObjectEncoding(info);
+         if (info.getUserRecordType() == JournalRecordIds.ADD_REF)
+         {
+            DescribeJournal.ReferenceDescribe ref = (DescribeJournal.ReferenceDescribe) o;
+            AtomicInteger count = messageRefCounts.get(ref.refEncoding.queueID);
+            if (count == null)
+            {
+               count = new AtomicInteger(1);
+               messageRefCounts.put(ref.refEncoding.queueID, count);
+            }
+            else
+            {
+               count.incrementAndGet();
+            }
+         }
+      }
+
+      messagesJournal.stop();
+
+      return messageRefCounts;
+
+   }
 }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/99147d07/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/bridge/BridgeTestBase.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/bridge/BridgeTestBase.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/bridge/BridgeTestBase.java
index 8bbce91..dd542f5 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/bridge/BridgeTestBase.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/bridge/BridgeTestBase.java
@@ -20,7 +20,7 @@ import java.util.Map;
 import java.util.concurrent.TimeUnit;
 
 import org.apache.activemq.artemis.api.core.TransportConfiguration;
-import org.apache.activemq.artemis.tests.util.UnitTestCase;
+import org.apache.activemq.artemis.tests.util.ServiceTestBase;
 import org.apache.activemq.artemis.core.config.Configuration;
 import org.apache.activemq.artemis.core.config.ha.SharedStoreMasterPolicyConfiguration;
 import org.apache.activemq.artemis.core.config.ha.SharedStoreSlavePolicyConfiguration;
@@ -31,7 +31,7 @@ import org.apache.activemq.artemis.core.server.NodeManager;
 import org.apache.activemq.artemis.tests.util.InVMNodeManagerServer;
 import org.junit.After;
 
-public abstract class BridgeTestBase extends UnitTestCase
+public abstract class BridgeTestBase extends ServiceTestBase
 {
 
    @Override

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/99147d07/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/distribution/ClusterTestBase.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/distribution/ClusterTestBase.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/distribution/ClusterTestBase.java
index 323d7b3..16ce2bc 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/distribution/ClusterTestBase.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/distribution/ClusterTestBase.java
@@ -16,21 +16,6 @@
  */
 package org.apache.activemq.artemis.tests.integration.cluster.distribution;
 
-import java.io.PrintWriter;
-import java.io.StringWriter;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.atomic.AtomicInteger;
-
 import org.apache.activemq.artemis.api.config.ActiveMQDefaultConfiguration;
 import org.apache.activemq.artemis.api.core.ActiveMQException;
 import org.apache.activemq.artemis.api.core.BroadcastGroupConfiguration;
@@ -39,14 +24,13 @@ import org.apache.activemq.artemis.api.core.Message;
 import org.apache.activemq.artemis.api.core.SimpleString;
 import org.apache.activemq.artemis.api.core.TransportConfiguration;
 import org.apache.activemq.artemis.api.core.UDPBroadcastEndpointFactory;
+import org.apache.activemq.artemis.api.core.client.ActiveMQClient;
 import org.apache.activemq.artemis.api.core.client.ClientConsumer;
 import org.apache.activemq.artemis.api.core.client.ClientMessage;
 import org.apache.activemq.artemis.api.core.client.ClientProducer;
 import org.apache.activemq.artemis.api.core.client.ClientSession;
 import org.apache.activemq.artemis.api.core.client.ClientSessionFactory;
-import org.apache.activemq.artemis.api.core.client.ActiveMQClient;
 import org.apache.activemq.artemis.api.core.client.ServerLocator;
-import org.apache.activemq.artemis.tests.util.UnitTestCase;
 import org.apache.activemq.artemis.core.client.impl.ServerLocatorInternal;
 import org.apache.activemq.artemis.core.client.impl.Topology;
 import org.apache.activemq.artemis.core.client.impl.TopologyMemberImpl;
@@ -68,9 +52,9 @@ import org.apache.activemq.artemis.core.remoting.impl.netty.TransportConstants;
 import org.apache.activemq.artemis.core.server.ActiveMQServer;
 import org.apache.activemq.artemis.core.server.ActiveMQServers;
 import org.apache.activemq.artemis.core.server.NodeManager;
+import org.apache.activemq.artemis.core.server.cluster.ActiveMQServerSideProtocolManagerFactory;
 import org.apache.activemq.artemis.core.server.cluster.ClusterConnection;
 import org.apache.activemq.artemis.core.server.cluster.ClusterManager;
-import org.apache.activemq.artemis.core.server.cluster.ActiveMQServerSideProtocolManagerFactory;
 import org.apache.activemq.artemis.core.server.cluster.RemoteQueueBinding;
 import org.apache.activemq.artemis.core.server.cluster.impl.ClusterConnectionImpl;
 import org.apache.activemq.artemis.core.server.cluster.qourum.SharedNothingBackupQuorum;
@@ -83,6 +67,21 @@ import org.junit.After;
 import org.junit.Assert;
 import org.junit.Before;
 
+import java.io.PrintWriter;
+import java.io.StringWriter;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.atomic.AtomicInteger;
+
 public abstract class ClusterTestBase extends ServiceTestBase
 {
    private static final IntegrationTestLogger log = IntegrationTestLogger.LOGGER;
@@ -138,7 +137,7 @@ public abstract class ClusterTestBase extends ServiceTestBase
 
       forceGC();
 
-      UnitTestCase.checkFreePort(ClusterTestBase.PORTS);
+      ServiceTestBase.checkFreePort(ClusterTestBase.PORTS);
 
       consumers = new ConsumerHolder[ClusterTestBase.MAX_CONSUMERS];
 
@@ -187,7 +186,7 @@ public abstract class ClusterTestBase extends ServiceTestBase
 
       super.tearDown();
 
-      UnitTestCase.checkFreePort(ClusterTestBase.PORTS);
+      ServiceTestBase.checkFreePort(ClusterTestBase.PORTS);
 
    }
 
@@ -663,7 +662,7 @@ public abstract class ClusterTestBase extends ServiceTestBase
       {
          // Proxy the failure and print a dump into System.out, so it is captured by Jenkins reports
          e.printStackTrace();
-         System.out.println(UnitTestCase.threadDump(" - fired by ClusterTestBase::addConsumer"));
+         System.out.println(ServiceTestBase.threadDump(" - fired by ClusterTestBase::addConsumer"));
 
          throw e;
       }
@@ -1541,11 +1540,11 @@ public abstract class ClusterTestBase extends ServiceTestBase
 
       if (netty)
       {
-         serverTotc = new TransportConfiguration(UnitTestCase.NETTY_CONNECTOR_FACTORY, params);
+         serverTotc = new TransportConfiguration(ServiceTestBase.NETTY_CONNECTOR_FACTORY, params);
       }
       else
       {
-         serverTotc = new TransportConfiguration(UnitTestCase.INVM_CONNECTOR_FACTORY, params);
+         serverTotc = new TransportConfiguration(INVM_CONNECTOR_FACTORY, params);
       }
 
       if (ha)
@@ -1582,11 +1581,11 @@ public abstract class ClusterTestBase extends ServiceTestBase
 
       if (netty)
       {
-         serverTotc = new TransportConfiguration(UnitTestCase.NETTY_CONNECTOR_FACTORY, params);
+         serverTotc = new TransportConfiguration(ServiceTestBase.NETTY_CONNECTOR_FACTORY, params);
       }
       else
       {
-         serverTotc = new TransportConfiguration(UnitTestCase.INVM_CONNECTOR_FACTORY, params);
+         serverTotc = new TransportConfiguration(INVM_CONNECTOR_FACTORY, params);
       }
 
       locators[node] = ActiveMQClient.createServerLocatorWithoutHA(serverTotc);

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/99147d07/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/distribution/MessageRedistributionWithDiscoveryTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/distribution/MessageRedistributionWithDiscoveryTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/distribution/MessageRedistributionWithDiscoveryTest.java
index 0110362..f117f76 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/distribution/MessageRedistributionWithDiscoveryTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/distribution/MessageRedistributionWithDiscoveryTest.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 package org.apache.activemq.artemis.tests.integration.cluster.distribution;
-import org.apache.activemq.artemis.tests.util.UnitTestCase;
+import org.apache.activemq.artemis.tests.util.ServiceTestBase;
 import org.junit.Assert;
 import org.junit.Before;
 
@@ -34,9 +34,9 @@ import org.apache.activemq.artemis.core.settings.impl.AddressSettings;
 
 public class MessageRedistributionWithDiscoveryTest extends ClusterTestBase
 {
-   protected final String groupAddress = UnitTestCase.getUDPDiscoveryAddress();
+   protected final String groupAddress = ServiceTestBase.getUDPDiscoveryAddress();
 
-   protected final int groupPort = UnitTestCase.getUDPDiscoveryPort();
+   protected final int groupPort = ServiceTestBase.getUDPDiscoveryPort();
 
    protected boolean isNetty()
    {

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/99147d07/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/distribution/SymmetricClusterTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/distribution/SymmetricClusterTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/distribution/SymmetricClusterTest.java
index 1bd25cc..71c83c0 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/distribution/SymmetricClusterTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/distribution/SymmetricClusterTest.java
@@ -16,7 +16,7 @@
  */
 package org.apache.activemq.artemis.tests.integration.cluster.distribution;
 import org.apache.activemq.artemis.tests.integration.IntegrationTestLogger;
-import org.apache.activemq.artemis.tests.util.UnitTestCase;
+import org.apache.activemq.artemis.tests.util.ServiceTestBase;
 import org.junit.Before;
 import org.junit.After;
 
@@ -153,7 +153,7 @@ public class SymmetricClusterTest extends ClusterTestBase
       }
       catch (Throwable e)
       {
-         System.out.println(UnitTestCase.threadDump("SymmetricClusterTest::testStopAllStartAll"));
+         System.out.println(ServiceTestBase.threadDump("SymmetricClusterTest::testStopAllStartAll"));
          throw e;
       }
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/99147d07/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/distribution/SymmetricClusterWithBackupTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/distribution/SymmetricClusterWithBackupTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/distribution/SymmetricClusterWithBackupTest.java
index 6d37234..cd1d35c 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/distribution/SymmetricClusterWithBackupTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/distribution/SymmetricClusterWithBackupTest.java
@@ -18,7 +18,7 @@ package org.apache.activemq.artemis.tests.integration.cluster.distribution;
 
 import org.apache.activemq.artemis.core.config.ha.SharedStoreSlavePolicyConfiguration;
 import org.apache.activemq.artemis.tests.integration.IntegrationTestLogger;
-import org.apache.activemq.artemis.tests.util.UnitTestCase;
+import org.apache.activemq.artemis.tests.util.ServiceTestBase;
 import org.junit.Test;
 
 public class SymmetricClusterWithBackupTest extends SymmetricClusterTest
@@ -121,7 +121,7 @@ public class SymmetricClusterWithBackupTest extends SymmetricClusterTest
       }
       catch (Throwable e)
       {
-         System.out.println(UnitTestCase.threadDump("SymmetricClusterWithBackupTest::testStopAllStartAll"));
+         System.out.println(ServiceTestBase.threadDump("SymmetricClusterWithBackupTest::testStopAllStartAll"));
          throw e;
       }
    }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/99147d07/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/distribution/SymmetricClusterWithDiscoveryTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/distribution/SymmetricClusterWithDiscoveryTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/distribution/SymmetricClusterWithDiscoveryTest.java
index 752c8f9..eee7afa 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/distribution/SymmetricClusterWithDiscoveryTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/distribution/SymmetricClusterWithDiscoveryTest.java
@@ -18,15 +18,15 @@ package org.apache.activemq.artemis.tests.integration.cluster.distribution;
 
 
 import org.apache.activemq.artemis.tests.integration.IntegrationTestLogger;
-import org.apache.activemq.artemis.tests.util.UnitTestCase;
+import org.apache.activemq.artemis.tests.util.ServiceTestBase;
 
 public class SymmetricClusterWithDiscoveryTest extends SymmetricClusterTest
 {
    private static final IntegrationTestLogger log = IntegrationTestLogger.LOGGER;
 
-   protected final String groupAddress = UnitTestCase.getUDPDiscoveryAddress();
+   protected final String groupAddress = ServiceTestBase.getUDPDiscoveryAddress();
 
-   protected final int groupPort = UnitTestCase.getUDPDiscoveryPort();
+   protected final int groupPort = ServiceTestBase.getUDPDiscoveryPort();
 
    protected boolean isNetty()
    {

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/99147d07/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/AutomaticColocatedQuorumVoteTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/AutomaticColocatedQuorumVoteTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/AutomaticColocatedQuorumVoteTest.java
index 07f749a..d251954 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/AutomaticColocatedQuorumVoteTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/AutomaticColocatedQuorumVoteTest.java
@@ -330,7 +330,11 @@ public class AutomaticColocatedQuorumVoteTest extends ServiceTestBase
          transportConfigurationList.add(otherLiveNode.getName());
          haPolicy.getExcludedConnectors().add(otherLiveNode.getName());
       }
-      configuration.addClusterConfiguration(basicClusterConnectionConfig(liveConnector.getName(), transportConfigurationList));
+
+      String[] input = new String[transportConfigurationList.size()];
+      transportConfigurationList.toArray(input);
+
+      configuration.addClusterConfiguration(basicClusterConnectionConfig(liveConnector.getName(), input));
       haPolicy.setBackupPortOffset(100);
       haPolicy.setBackupRequestRetries(-1);
       haPolicy.setBackupRequestRetryInterval(500);

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/99147d07/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/BackupSyncLargeMessageTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/BackupSyncLargeMessageTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/BackupSyncLargeMessageTest.java
index 3e66bb9..386c306 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/BackupSyncLargeMessageTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/BackupSyncLargeMessageTest.java
@@ -18,7 +18,7 @@ package org.apache.activemq.artemis.tests.integration.cluster.failover;
 
 import org.apache.activemq.artemis.api.core.ActiveMQBuffer;
 import org.apache.activemq.artemis.api.core.ActiveMQException;
-import org.apache.activemq.artemis.tests.util.UnitTestCase;
+import org.apache.activemq.artemis.tests.util.ServiceTestBase;
 import org.junit.Test;
 
 import java.io.File;
@@ -130,7 +130,7 @@ public class BackupSyncLargeMessageTest extends BackupSyncJournalTest
       final ClientProducer producer = session.createProducer(FailoverTestBase.ADDRESS);
       final ClientMessage message = session.createMessage(true);
       final int largeMessageSize = 1000 * MIN_LARGE_MESSAGE;
-      message.setBodyInputStream(UnitTestCase.createFakeLargeStream(largeMessageSize));
+      message.setBodyInputStream(ServiceTestBase.createFakeLargeStream(largeMessageSize));
 
       final AtomicBoolean caughtException = new AtomicBoolean(false);
       final CountDownLatch latch = new CountDownLatch(1);
@@ -162,7 +162,7 @@ public class BackupSyncLargeMessageTest extends BackupSyncJournalTest
       Executors.defaultThreadFactory().newThread(r).start();
       waitForLatch(latch);
       startBackupFinishSyncing();
-      UnitTestCase.waitForLatch(latch2);
+      ServiceTestBase.waitForLatch(latch2);
       crash(session);
       assertFalse("no exceptions while sending message", caughtException.get());
 
@@ -174,7 +174,7 @@ public class BackupSyncLargeMessageTest extends BackupSyncJournalTest
       for (int j = 0; j < largeMessageSize; j++)
       {
          Assert.assertTrue("large msg , expecting " + largeMessageSize + " bytes, got " + j, buffer.readable());
-         Assert.assertEquals("equal at " + j, UnitTestCase.getSamplebyte(j), buffer.readByte());
+         Assert.assertEquals("equal at " + j, ServiceTestBase.getSamplebyte(j), buffer.readByte());
       }
       receiveMessages(consumer, 0, 20, true);
       assertNull("there should be no more messages!", consumer.receiveImmediate());

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/99147d07/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/FailoverTestBase.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/FailoverTestBase.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/FailoverTestBase.java
index a93a6f2..fbc6cd0 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/FailoverTestBase.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/FailoverTestBase.java
@@ -16,26 +16,15 @@
  */
 package org.apache.activemq.artemis.tests.integration.cluster.failover;
 
-import java.io.IOException;
-import java.net.ServerSocket;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.TimeUnit;
-
 import org.apache.activemq.artemis.api.core.ActiveMQBuffer;
 import org.apache.activemq.artemis.api.core.SimpleString;
 import org.apache.activemq.artemis.api.core.TransportConfiguration;
+import org.apache.activemq.artemis.api.core.client.ActiveMQClient;
 import org.apache.activemq.artemis.api.core.client.ClientMessage;
 import org.apache.activemq.artemis.api.core.client.ClientSession;
 import org.apache.activemq.artemis.api.core.client.ClusterTopologyListener;
-import org.apache.activemq.artemis.api.core.client.ActiveMQClient;
 import org.apache.activemq.artemis.api.core.client.ServerLocator;
 import org.apache.activemq.artemis.api.core.client.TopologyMember;
-import org.apache.activemq.artemis.tests.integration.cluster.util.TestableServer;
-import org.apache.activemq.artemis.tests.util.ReplicatedBackupUtils;
-import org.apache.activemq.artemis.tests.util.ServiceTestBase;
-import org.apache.activemq.artemis.tests.util.UnitTestCase;
 import org.apache.activemq.artemis.core.client.impl.ClientSessionFactoryInternal;
 import org.apache.activemq.artemis.core.client.impl.ServerLocatorInternal;
 import org.apache.activemq.artemis.core.config.ClusterConnectionConfiguration;
@@ -50,10 +39,20 @@ import org.apache.activemq.artemis.core.server.cluster.ha.ReplicatedPolicy;
 import org.apache.activemq.artemis.core.server.impl.ActiveMQServerImpl;
 import org.apache.activemq.artemis.core.server.impl.InVMNodeManager;
 import org.apache.activemq.artemis.tests.integration.cluster.util.SameProcessActiveMQServer;
+import org.apache.activemq.artemis.tests.integration.cluster.util.TestableServer;
+import org.apache.activemq.artemis.tests.util.ReplicatedBackupUtils;
+import org.apache.activemq.artemis.tests.util.ServiceTestBase;
 import org.junit.After;
 import org.junit.Assert;
 import org.junit.Before;
 
+import java.io.IOException;
+import java.net.ServerSocket;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.TimeUnit;
+
 public abstract class FailoverTestBase extends ServiceTestBase
 {
    // Constants -----------------------------------------------------
@@ -143,7 +142,7 @@ public abstract class FailoverTestBase extends ServiceTestBase
    {
       try
       {
-         message.setBodyInputStream(UnitTestCase.createFakeLargeStream(LARGE_MESSAGE_SIZE));
+         message.setBodyInputStream(ServiceTestBase.createFakeLargeStream(LARGE_MESSAGE_SIZE));
       }
       catch (Exception e)
       {
@@ -164,7 +163,7 @@ public abstract class FailoverTestBase extends ServiceTestBase
       for (int j = 0; j < LARGE_MESSAGE_SIZE; j++)
       {
          Assert.assertTrue("msg " + i + ", expecting " + LARGE_MESSAGE_SIZE + " bytes, got " + j, buffer.readable());
-         Assert.assertEquals("equal at " + j, UnitTestCase.getSamplebyte(j), buffer.readByte());
+         Assert.assertEquals("equal at " + j, ServiceTestBase.getSamplebyte(j), buffer.readByte());
       }
    }
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/99147d07/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/LiveToLiveFailoverTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/LiveToLiveFailoverTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/LiveToLiveFailoverTest.java
index 16647e9..ed99b57 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/LiveToLiveFailoverTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/LiveToLiveFailoverTest.java
@@ -32,6 +32,7 @@ import org.apache.activemq.artemis.tests.util.TransportConfigurationUtils;
 import org.junit.Assert;
 import org.junit.Test;
 
+import java.util.HashMap;
 import java.util.Map;
 import java.util.concurrent.CountDownLatch;
 import java.util.concurrent.TimeUnit;
@@ -56,7 +57,7 @@ public class LiveToLiveFailoverTest extends FailoverTest
       TransportConfiguration liveConnector0 = getConnectorTransportConfiguration(true, 0);
       TransportConfiguration liveConnector1 = getConnectorTransportConfiguration(true, 1);
 
-      backupConfig = super.createDefaultConfig(1)
+      backupConfig = super.createDefaultConfig(1, new HashMap<String, Object>(), INVM_ACCEPTOR_FACTORY)
          .clearAcceptorConfigurations()
          .addAcceptorConfiguration(getAcceptorTransportConfiguration(true, 1))
          .setHAPolicyConfiguration(new ColocatedPolicyConfiguration()
@@ -72,7 +73,7 @@ public class LiveToLiveFailoverTest extends FailoverTest
 
       backupServer = createColocatedTestableServer(backupConfig, nodeManager1, nodeManager0, 1);
 
-      liveConfig = super.createDefaultConfig(0)
+      liveConfig = super.createDefaultConfig(0, new HashMap<String, Object>(), INVM_ACCEPTOR_FACTORY)
          .clearAcceptorConfigurations()
          .addAcceptorConfiguration(getAcceptorTransportConfiguration(true, 0))
          .setHAPolicyConfiguration(new ColocatedPolicyConfiguration()

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/99147d07/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/MultipleLivesMultipleBackupsFailoverTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/MultipleLivesMultipleBackupsFailoverTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/MultipleLivesMultipleBackupsFailoverTest.java
index 5e1b641..3c6c2d7 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/MultipleLivesMultipleBackupsFailoverTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/MultipleLivesMultipleBackupsFailoverTest.java
@@ -33,9 +33,7 @@ import org.apache.activemq.artemis.tests.integration.cluster.util.TestableServer
 import org.junit.After;
 import org.junit.Test;
 
-import java.util.ArrayList;
 import java.util.HashMap;
-import java.util.List;
 import java.util.Map;
 
 /**
@@ -177,12 +175,12 @@ public class MultipleLivesMultipleBackupsFailoverTest extends MultipleBackupsFai
       TransportConfiguration backupConnector = createTransportConfiguration(isNetty(), false, generateParams(nodeid, isNetty()));
       config1.addConnectorConfiguration(backupConnector.getName(), backupConnector);
 
-      List<String> clusterNodes = new ArrayList<String>();
-      for (int node : otherClusterNodes)
+      String[] clusterNodes = new String[otherClusterNodes.length];
+      for (int i = 0; i < otherClusterNodes.length; i++)
       {
-         TransportConfiguration connector = createTransportConfiguration(isNetty(), false, generateParams(node, isNetty()));
+         TransportConfiguration connector = createTransportConfiguration(isNetty(), false, generateParams(otherClusterNodes[i], isNetty()));
          config1.addConnectorConfiguration(connector.getName(), connector);
-         clusterNodes.add(connector.getName());
+         clusterNodes[i] = connector.getName();
       }
       config1.addClusterConfiguration(basicClusterConnectionConfig(backupConnector.getName(), clusterNodes));
 
@@ -204,12 +202,12 @@ public class MultipleLivesMultipleBackupsFailoverTest extends MultipleBackupsFai
          .setLargeMessagesDirectory(getLargeMessagesDir() + "_" + liveNode)
          .addConnectorConfiguration(liveConnector.getName(), liveConnector);
 
-      List<String> pairs = new ArrayList<String>();
-      for (int node : otherLiveNodes)
+      String[] pairs = new String[otherLiveNodes.length];
+      for (int i = 0; i < otherLiveNodes.length; i++)
       {
-         TransportConfiguration otherLiveConnector = createTransportConfiguration(isNetty(), false, generateParams(node, isNetty()));
+         TransportConfiguration otherLiveConnector = createTransportConfiguration(isNetty(), false, generateParams(otherLiveNodes[i], isNetty()));
          config0.addConnectorConfiguration(otherLiveConnector.getName(), otherLiveConnector);
-         pairs.add(otherLiveConnector.getName());
+         pairs[i] = otherLiveConnector.getName();
       }
       config0.addClusterConfiguration(basicClusterConnectionConfig(liveConnector.getName(), pairs));
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/99147d07/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/MultipleServerFailoverTestBase.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/MultipleServerFailoverTestBase.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/MultipleServerFailoverTestBase.java
index 86c1b9b..f4ca1c6 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/MultipleServerFailoverTestBase.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/MultipleServerFailoverTestBase.java
@@ -129,7 +129,9 @@ public abstract class MultipleServerFailoverTestBase extends ServiceTestBase
             }
          }
 
-         configuration.addClusterConfiguration(basicClusterConnectionConfig(livetc.getName(), connectors));
+         String[] input = new String[connectors.size()];
+         connectors.toArray(input);
+         configuration.addClusterConfiguration(basicClusterConnectionConfig(livetc.getName(), input));
          liveConfigs.add(configuration);
          ActiveMQServer server = createServer(true, configuration);
          TestableServer activeMQServer = new SameProcessActiveMQServer(server);
@@ -190,7 +192,9 @@ public abstract class MultipleServerFailoverTestBase extends ServiceTestBase
                connectors.add(staticTc.getName());
             }
          }
-         configuration.addClusterConfiguration(basicClusterConnectionConfig(backuptc.getName(), connectors));
+         String[] input = new String[connectors.size()];
+         connectors.toArray(input);
+         configuration.addClusterConfiguration(basicClusterConnectionConfig(backuptc.getName(), input));
          backupConfigs.add(configuration);
          ActiveMQServer server = createServer(true, configuration);
          TestableServer testableServer = new SameProcessActiveMQServer(server);

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/99147d07/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/QuorumVoteServerConnectTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/QuorumVoteServerConnectTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/QuorumVoteServerConnectTest.java
index d6631ec..93d3f17 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/QuorumVoteServerConnectTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/QuorumVoteServerConnectTest.java
@@ -17,7 +17,7 @@
 package org.apache.activemq.artemis.tests.integration.cluster.failover;
 
 
-import org.apache.activemq.artemis.tests.util.UnitTestCase;
+import org.apache.activemq.artemis.tests.util.ServiceTestBase;
 import org.apache.activemq.artemis.core.server.cluster.qourum.BooleanVote;
 import org.apache.activemq.artemis.core.server.cluster.qourum.QuorumVoteServerConnect;
 import org.apache.activemq.artemis.tests.integration.server.FakeStorageManager;
@@ -29,7 +29,7 @@ import java.util.Arrays;
 import java.util.Collection;
 
 @RunWith(Parameterized.class)
-public class QuorumVoteServerConnectTest extends UnitTestCase
+public class QuorumVoteServerConnectTest extends ServiceTestBase
 {
 
    private final int size;

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/99147d07/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/SingleLiveMultipleBackupsFailoverTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/SingleLiveMultipleBackupsFailoverTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/SingleLiveMultipleBackupsFailoverTest.java
index f0a34af..efed080 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/SingleLiveMultipleBackupsFailoverTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/SingleLiveMultipleBackupsFailoverTest.java
@@ -33,9 +33,7 @@ import org.apache.activemq.artemis.tests.integration.cluster.util.TestableServer
 import org.junit.After;
 import org.junit.Test;
 
-import java.util.ArrayList;
 import java.util.HashMap;
-import java.util.List;
 import java.util.Map;
 
 /**
@@ -146,13 +144,12 @@ public class SingleLiveMultipleBackupsFailoverTest extends MultipleBackupsFailov
          .setPagingDirectory(getPageDir() + "_" + liveNode)
          .setLargeMessagesDirectory(getLargeMessagesDir() + "_" + liveNode);
 
-      List<String> staticConnectors = new ArrayList<String>();
-
-      for (int node : nodes)
+      String[] staticConnectors = new String[nodes.length];
+      for (int i = 0; i < nodes.length; i++)
       {
-         TransportConfiguration liveConnector = createTransportConfiguration(isNetty(), false, generateParams(node, isNetty()));
+         TransportConfiguration liveConnector = createTransportConfiguration(isNetty(), false, generateParams(nodes[i], isNetty()));
          config1.addConnectorConfiguration(liveConnector.getName(), liveConnector);
-         staticConnectors.add(liveConnector.getName());
+         staticConnectors[i] = liveConnector.getName();
       }
       config1.addClusterConfiguration(basicClusterConnectionConfig(backupConnector.getName(), staticConnectors));
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/99147d07/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/reattach/MultiThreadRandomReattachTestBase.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/reattach/MultiThreadRandomReattachTestBase.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/reattach/MultiThreadRandomReattachTestBase.java
index c23177b..65fb198 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/reattach/MultiThreadRandomReattachTestBase.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/reattach/MultiThreadRandomReattachTestBase.java
@@ -17,7 +17,7 @@
 package org.apache.activemq.artemis.tests.integration.cluster.reattach;
 import org.apache.activemq.artemis.api.core.ActiveMQException;
 import org.apache.activemq.artemis.tests.integration.IntegrationTestLogger;
-import org.apache.activemq.artemis.tests.util.UnitTestCase;
+import org.apache.activemq.artemis.tests.util.ServiceTestBase;
 import org.junit.Before;
 import org.junit.After;
 
@@ -1277,7 +1277,7 @@ public abstract class MultiThreadRandomReattachTestBase extends MultiThreadReatt
    @After
    public void tearDown() throws Exception
    {
-      UnitTestCase.stopComponent(liveServer);
+      ServiceTestBase.stopComponent(liveServer);
 
       liveServer = null;
 
@@ -1317,7 +1317,7 @@ public abstract class MultiThreadRandomReattachTestBase extends MultiThreadReatt
    @Override
    protected void stop() throws Exception
    {
-      UnitTestCase.stopComponent(liveServer);
+      ServiceTestBase.stopComponent(liveServer);
 
       System.gc();
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/99147d07/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/reattach/MultiThreadReattachSupportTestBase.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/reattach/MultiThreadReattachSupportTestBase.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/reattach/MultiThreadReattachSupportTestBase.java
index 7c5ac0a..cb6c3ad 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/reattach/MultiThreadReattachSupportTestBase.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/reattach/MultiThreadReattachSupportTestBase.java
@@ -15,17 +15,8 @@
  * limitations under the License.
  */
 package org.apache.activemq.artemis.tests.integration.cluster.reattach;
-import org.apache.activemq.artemis.api.core.ActiveMQNotConnectedException;
-import org.junit.Before;
-import org.junit.After;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Timer;
-import java.util.TimerTask;
-
-import org.junit.Assert;
 
+import org.apache.activemq.artemis.api.core.ActiveMQNotConnectedException;
 import org.apache.activemq.artemis.api.core.client.ClientSession;
 import org.apache.activemq.artemis.api.core.client.ClientSessionFactory;
 import org.apache.activemq.artemis.api.core.client.ServerLocator;
@@ -35,7 +26,14 @@ import org.apache.activemq.artemis.core.protocol.core.impl.RemotingConnectionImp
 import org.apache.activemq.artemis.core.remoting.impl.invm.InVMConnector;
 import org.apache.activemq.artemis.tests.integration.IntegrationTestLogger;
 import org.apache.activemq.artemis.tests.util.ServiceTestBase;
-import org.apache.activemq.artemis.tests.util.UnitTestCase;
+import org.junit.After;
+import org.junit.Assert;
+import org.junit.Before;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Timer;
+import java.util.TimerTask;
 
 public abstract class MultiThreadReattachSupportTestBase extends ServiceTestBase
 {
@@ -122,7 +120,7 @@ public abstract class MultiThreadReattachSupportTestBase extends ServiceTestBase
 
                   // Case a failure happened here, it should print the Thread dump
                   // Sending it to System.out, as it would show on the Tests report
-                  System.out.println(UnitTestCase.threadDump(" - fired by MultiThreadRandomReattachTestBase::runTestMultipleThreads (" + t.getLocalizedMessage() +
+                  System.out.println(ServiceTestBase.threadDump(" - fired by MultiThreadRandomReattachTestBase::runTestMultipleThreads (" + t.getLocalizedMessage() +
                                                              ")"));
                }
             }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/99147d07/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/reattach/RandomReattachTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/reattach/RandomReattachTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/reattach/RandomReattachTest.java
index 18acd07..bc573c4 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/reattach/RandomReattachTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/reattach/RandomReattachTest.java
@@ -16,29 +16,18 @@
  */
 package org.apache.activemq.artemis.tests.integration.cluster.reattach;
 
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.Set;
-import java.util.Timer;
-import java.util.TimerTask;
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.TimeUnit;
-
 import org.apache.activemq.artemis.api.core.ActiveMQException;
 import org.apache.activemq.artemis.api.core.ActiveMQNotConnectedException;
 import org.apache.activemq.artemis.api.core.SimpleString;
 import org.apache.activemq.artemis.api.core.TransportConfiguration;
+import org.apache.activemq.artemis.api.core.client.ActiveMQClient;
 import org.apache.activemq.artemis.api.core.client.ClientConsumer;
 import org.apache.activemq.artemis.api.core.client.ClientMessage;
 import org.apache.activemq.artemis.api.core.client.ClientProducer;
 import org.apache.activemq.artemis.api.core.client.ClientSession;
 import org.apache.activemq.artemis.api.core.client.ClientSessionFactory;
-import org.apache.activemq.artemis.api.core.client.ActiveMQClient;
 import org.apache.activemq.artemis.api.core.client.MessageHandler;
 import org.apache.activemq.artemis.api.core.client.ServerLocator;
-import org.apache.activemq.artemis.tests.integration.IntegrationTestLogger;
-import org.apache.activemq.artemis.tests.util.ServiceTestBase;
-import org.apache.activemq.artemis.tests.util.UnitTestCase;
 import org.apache.activemq.artemis.core.client.impl.ClientSessionFactoryImpl;
 import org.apache.activemq.artemis.core.client.impl.ClientSessionInternal;
 import org.apache.activemq.artemis.core.config.Configuration;
@@ -46,12 +35,22 @@ import org.apache.activemq.artemis.core.remoting.impl.invm.InVMRegistry;
 import org.apache.activemq.artemis.core.server.ActiveMQServer;
 import org.apache.activemq.artemis.core.server.ActiveMQServers;
 import org.apache.activemq.artemis.jms.client.ActiveMQTextMessage;
+import org.apache.activemq.artemis.tests.integration.IntegrationTestLogger;
+import org.apache.activemq.artemis.tests.util.ServiceTestBase;
 import org.junit.After;
 import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Test;
 
-public class RandomReattachTest extends UnitTestCase
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.Set;
+import java.util.Timer;
+import java.util.TimerTask;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.TimeUnit;
+
+public class RandomReattachTest extends ServiceTestBase
 {
    private static final IntegrationTestLogger log = IntegrationTestLogger.LOGGER;
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/99147d07/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/topology/IsolatedTopologyTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/topology/IsolatedTopologyTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/topology/IsolatedTopologyTest.java
index ba2b163..e27e103 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/topology/IsolatedTopologyTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/topology/IsolatedTopologyTest.java
@@ -16,23 +16,22 @@
  */
 package org.apache.activemq.artemis.tests.integration.cluster.topology;
 
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
 import org.apache.activemq.artemis.api.core.TransportConfiguration;
-import org.apache.activemq.artemis.tests.util.ServiceTestBase;
-import org.apache.activemq.artemis.tests.util.UnitTestCase;
 import org.apache.activemq.artemis.core.client.impl.Topology;
 import org.apache.activemq.artemis.core.client.impl.TopologyMemberImpl;
 import org.apache.activemq.artemis.core.config.ClusterConnectionConfiguration;
 import org.apache.activemq.artemis.core.config.Configuration;
 import org.apache.activemq.artemis.core.remoting.impl.netty.TransportConstants;
 import org.apache.activemq.artemis.core.server.ActiveMQServer;
+import org.apache.activemq.artemis.tests.util.ServiceTestBase;
 import org.junit.Assert;
 import org.junit.Test;
 
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
 public class IsolatedTopologyTest extends ServiceTestBase
 {
 
@@ -109,7 +108,7 @@ public class IsolatedTopologyTest extends ServiceTestBase
       params.put(TransportConstants.CLUSTER_CONNECTION, "cc1");
       params.put(org.apache.activemq.artemis.core.remoting.impl.invm.TransportConstants.SERVER_ID_PROP_NAME, "1");
 
-      TransportConfiguration acceptor1VM1 = new TransportConfiguration(UnitTestCase.INVM_ACCEPTOR_FACTORY,
+      TransportConfiguration acceptor1VM1 = new TransportConfiguration(ServiceTestBase.INVM_ACCEPTOR_FACTORY,
                                                                        params,
                                                                        "acceptor-cc1");
 
@@ -117,7 +116,7 @@ public class IsolatedTopologyTest extends ServiceTestBase
       params.put(TransportConstants.CLUSTER_CONNECTION, "cc2");
       params.put(org.apache.activemq.artemis.core.remoting.impl.invm.TransportConstants.SERVER_ID_PROP_NAME, "2");
 
-      TransportConfiguration acceptor2VM1 = new TransportConfiguration(UnitTestCase.INVM_ACCEPTOR_FACTORY,
+      TransportConfiguration acceptor2VM1 = new TransportConfiguration(ServiceTestBase.INVM_ACCEPTOR_FACTORY,
                                                                        params,
                                                                        "acceptor-cc2");
 
@@ -166,7 +165,7 @@ public class IsolatedTopologyTest extends ServiceTestBase
       params.put(TransportConstants.CLUSTER_CONNECTION, "cc1");
       params.put(org.apache.activemq.artemis.core.remoting.impl.invm.TransportConstants.SERVER_ID_PROP_NAME, "3");
 
-      TransportConfiguration acceptor1VM1 = new TransportConfiguration(UnitTestCase.INVM_ACCEPTOR_FACTORY,
+      TransportConfiguration acceptor1VM1 = new TransportConfiguration(ServiceTestBase.INVM_ACCEPTOR_FACTORY,
                                                                        params,
                                                                        "acceptor-cc1");
 
@@ -174,7 +173,7 @@ public class IsolatedTopologyTest extends ServiceTestBase
       params.put(TransportConstants.CLUSTER_CONNECTION, "cc2");
       params.put(org.apache.activemq.artemis.core.remoting.impl.invm.TransportConstants.SERVER_ID_PROP_NAME, "4");
 
-      TransportConfiguration acceptor2VM1 = new TransportConfiguration(UnitTestCase.INVM_ACCEPTOR_FACTORY,
+      TransportConfiguration acceptor2VM1 = new TransportConfiguration(ServiceTestBase.INVM_ACCEPTOR_FACTORY,
                                                                        params,
                                                                        "acceptor-cc2");
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/99147d07/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/topology/TopologyClusterTestBase.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/topology/TopologyClusterTestBase.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/topology/TopologyClusterTestBase.java
index 6388083..54c3734 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/topology/TopologyClusterTestBase.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/topology/TopologyClusterTestBase.java
@@ -16,11 +16,6 @@
  */
 package org.apache.activemq.artemis.tests.integration.cluster.topology;
 
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-import java.util.concurrent.CountDownLatch;
-
 import org.apache.activemq.artemis.api.core.ActiveMQException;
 import org.apache.activemq.artemis.api.core.ActiveMQExceptionType;
 import org.apache.activemq.artemis.api.core.ActiveMQObjectClosedException;
@@ -32,21 +27,25 @@ import org.apache.activemq.artemis.api.core.client.ClientSessionFactory;
 import org.apache.activemq.artemis.api.core.client.ClusterTopologyListener;
 import org.apache.activemq.artemis.api.core.client.ServerLocator;
 import org.apache.activemq.artemis.api.core.client.TopologyMember;
-import org.apache.activemq.artemis.tests.integration.IntegrationTestLogger;
-import org.apache.activemq.artemis.tests.integration.cluster.distribution.ClusterTestBase;
-import org.apache.activemq.artemis.tests.util.ServiceTestBase;
-import org.apache.activemq.artemis.tests.util.UnitTestCase;
 import org.apache.activemq.artemis.core.client.impl.ServerLocatorImpl;
 import org.apache.activemq.artemis.core.config.Configuration;
 import org.apache.activemq.artemis.core.server.ActiveMQServer;
 import org.apache.activemq.artemis.core.server.cluster.ClusterConnection;
 import org.apache.activemq.artemis.core.server.cluster.ClusterManager;
+import org.apache.activemq.artemis.tests.integration.IntegrationTestLogger;
+import org.apache.activemq.artemis.tests.integration.cluster.distribution.ClusterTestBase;
 import org.apache.activemq.artemis.tests.util.RandomUtil;
+import org.apache.activemq.artemis.tests.util.ServiceTestBase;
 import org.junit.After;
 import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Test;
 
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import java.util.concurrent.CountDownLatch;
+
 import static java.util.concurrent.TimeUnit.SECONDS;
 
 public abstract class TopologyClusterTestBase extends ClusterTestBase
@@ -396,7 +395,7 @@ public abstract class TopologyClusterTestBase extends ClusterTestBase
             s.getConfiguration().setSecurityEnabled(true);
          }
       }
-      Assert.assertEquals(UnitTestCase.CLUSTER_PASSWORD, config.getClusterPassword());
+      Assert.assertEquals(ServiceTestBase.CLUSTER_PASSWORD, config.getClusterPassword());
       config.setClusterPassword(config.getClusterPassword() + "-1-2-3-");
       startServers(0, 1, 2, 4, 3);
       int n = 0;
@@ -412,7 +411,7 @@ public abstract class TopologyClusterTestBase extends ClusterTestBase
       final String address = "foo1235";
       ServerLocator locator = createNonHALocator(isNetty());
       ClientSessionFactory sf = createSessionFactory(locator);
-      ClientSession session = sf.createSession(config.getClusterUser(), UnitTestCase.CLUSTER_PASSWORD, false, true, true, false, 1);
+      ClientSession session = sf.createSession(config.getClusterUser(), ServiceTestBase.CLUSTER_PASSWORD, false, true, true, false, 1);
       session.createQueue(address, address, true);
       ClientProducer producer = session.createProducer(address);
       sendMessages(session, producer, 100);

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/99147d07/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/discovery/DiscoveryBaseTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/discovery/DiscoveryBaseTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/discovery/DiscoveryBaseTest.java
index bf610a3..0cc4e4c 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/discovery/DiscoveryBaseTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/discovery/DiscoveryBaseTest.java
@@ -28,7 +28,7 @@ import org.apache.activemq.artemis.api.core.SimpleString;
 import org.apache.activemq.artemis.api.core.TransportConfiguration;
 import org.apache.activemq.artemis.api.core.UDPBroadcastEndpointFactory;
 import org.apache.activemq.artemis.tests.integration.IntegrationTestLogger;
-import org.apache.activemq.artemis.tests.util.UnitTestCase;
+import org.apache.activemq.artemis.tests.util.ServiceTestBase;
 import org.apache.activemq.artemis.core.cluster.DiscoveryEntry;
 import org.apache.activemq.artemis.core.cluster.DiscoveryGroup;
 import org.apache.activemq.artemis.core.cluster.DiscoveryListener;
@@ -39,7 +39,7 @@ import org.apache.activemq.artemis.core.server.management.NotificationService;
 import org.apache.activemq.artemis.utils.UUIDGenerator;
 import org.junit.Assert;
 
-public class DiscoveryBaseTest extends UnitTestCase
+public class DiscoveryBaseTest extends ServiceTestBase
 {
    protected static final IntegrationTestLogger log = IntegrationTestLogger.LOGGER;
 


Mime
View raw message