activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From andytay...@apache.org
Subject [05/13] activemq-artemis git commit: Refactor base test classes
Date Wed, 20 May 2015 09:47:10 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/divert/PersistentDivertTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/divert/PersistentDivertTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/divert/PersistentDivertTest.java
index 7d46b2e..fa3d076 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/divert/PersistentDivertTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/divert/PersistentDivertTest.java
@@ -16,27 +16,24 @@
  */
 package org.apache.activemq.artemis.tests.integration.divert;
 
-import org.apache.activemq.artemis.tests.util.ServiceTestBase;
-import org.apache.activemq.artemis.tests.util.UnitTestCase;
-import org.junit.Test;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.junit.Assert;
-
 import org.apache.activemq.artemis.api.core.SimpleString;
+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.core.config.Configuration;
 import org.apache.activemq.artemis.core.config.DivertConfiguration;
 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.Assert;
+import org.junit.Test;
+
+import java.util.ArrayList;
+import java.util.List;
 
 public class PersistentDivertTest extends ServiceTestBase
 {
@@ -144,7 +141,7 @@ public class PersistentDivertTest extends ServiceTestBase
 
          if (largeMessage)
          {
-            message.setBodyInputStream(UnitTestCase.createFakeLargeStream(minLargeMessageSize));
+            message.setBodyInputStream(ServiceTestBase.createFakeLargeStream(minLargeMessageSize));
          }
 
          message.putIntProperty(propKey, i);
@@ -235,7 +232,7 @@ public class PersistentDivertTest extends ServiceTestBase
    {
       for (int j = 0; j < minLargeMessageSize; j++)
       {
-         Assert.assertEquals(UnitTestCase.getSamplebyte(j), message.getBodyBuffer().readByte());
+         Assert.assertEquals(ServiceTestBase.getSamplebyte(j), message.getBodyBuffer().readByte());
       }
    }
 
@@ -332,7 +329,7 @@ public class PersistentDivertTest extends ServiceTestBase
 
          if (largeMessage)
          {
-            message.setBodyInputStream(UnitTestCase.createFakeLargeStream(minLargeMessageSize));
+            message.setBodyInputStream(ServiceTestBase.createFakeLargeStream(minLargeMessageSize));
          }
 
          producer.send(message);

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/99147d07/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/embedded/ValidateAIOTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/embedded/ValidateAIOTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/embedded/ValidateAIOTest.java
index 81e9f74..afc2129 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/embedded/ValidateAIOTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/embedded/ValidateAIOTest.java
@@ -32,7 +32,7 @@ public class ValidateAIOTest extends ServiceTestBase
    @Test
    public void testValidateAIO() throws Exception
    {
-      Configuration config = createDefaultConfig(false)
+      Configuration config = createDefaultConfig()
          // This will force AsyncIO
          .setJournalType(JournalType.ASYNCIO);
       ActiveMQServer server = ActiveMQServers.newActiveMQServer(config, 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/http/CoreClientOverHttpTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/http/CoreClientOverHttpTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/http/CoreClientOverHttpTest.java
index 485a28a..611bcb5 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/http/CoreClientOverHttpTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/http/CoreClientOverHttpTest.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 package org.apache.activemq.artemis.tests.integration.http;
-import org.apache.activemq.artemis.tests.util.UnitTestCase;
+import org.apache.activemq.artemis.tests.util.ServiceTestBase;
 import org.junit.Before;
 
 import org.junit.Test;
@@ -40,7 +40,7 @@ import org.apache.activemq.artemis.core.server.ActiveMQServer;
 import org.apache.activemq.artemis.core.server.ActiveMQServers;
 import org.apache.activemq.artemis.jms.client.ActiveMQTextMessage;
 
-public class CoreClientOverHttpTest extends UnitTestCase
+public class CoreClientOverHttpTest extends ServiceTestBase
 {
    private static final SimpleString QUEUE = new SimpleString("CoreClientOverHttpTestQueue");
    private Configuration conf;

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/99147d07/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/ActiveMQConnectionFactoryTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/ActiveMQConnectionFactoryTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/ActiveMQConnectionFactoryTest.java
index e4d1898..15d1428 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/ActiveMQConnectionFactoryTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/ActiveMQConnectionFactoryTest.java
@@ -16,7 +16,7 @@
  */
 package org.apache.activemq.artemis.tests.integration.jms;
 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.config.ha.SharedStoreMasterPolicyConfiguration;
 import org.junit.Before;
 
@@ -50,7 +50,7 @@ import org.apache.activemq.artemis.tests.util.RandomUtil;
  *
  * A ActiveMQConnectionFactoryTest
  */
-public class ActiveMQConnectionFactoryTest extends UnitTestCase
+public class ActiveMQConnectionFactoryTest 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/jms/FloodServerTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/FloodServerTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/FloodServerTest.java
index 7603397..68f93d2 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/FloodServerTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/FloodServerTest.java
@@ -45,13 +45,13 @@ import org.apache.activemq.artemis.core.server.ActiveMQServer;
 import org.apache.activemq.artemis.core.server.ActiveMQServers;
 import org.apache.activemq.artemis.jms.server.impl.JMSServerManagerImpl;
 import org.apache.activemq.artemis.tests.integration.IntegrationTestLogger;
-import org.apache.activemq.artemis.tests.util.UnitTestCase;
+import org.apache.activemq.artemis.tests.util.ServiceTestBase;
 
 /**
  *
  * A FloodServerTest
  */
-public class FloodServerTest extends UnitTestCase
+public class FloodServerTest extends ServiceTestBase
 {
    // Constants -----------------------------------------------------
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/99147d07/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/SimpleJNDIClientTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/SimpleJNDIClientTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/SimpleJNDIClientTest.java
index 73cc9f6..ed0c9bb 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/SimpleJNDIClientTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/SimpleJNDIClientTest.java
@@ -40,7 +40,7 @@ import org.apache.activemq.artemis.api.core.JGroupsPropertiesBroadcastEndpointFa
 import org.apache.activemq.artemis.api.core.TransportConfiguration;
 import org.apache.activemq.artemis.api.core.UDPBroadcastEndpointFactory;
 import org.apache.activemq.artemis.api.jms.JMSFactoryType;
-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.remoting.impl.netty.TransportConstants;
@@ -56,7 +56,7 @@ import org.junit.Test;
  *
  * A ActiveMQConnectionFactoryTest
  */
-public class SimpleJNDIClientTest extends UnitTestCase
+public class SimpleJNDIClientTest extends ServiceTestBase
 {
    private final String groupAddress = getUDPDiscoveryAddress();
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/99147d07/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/client/ReSendMessageTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/client/ReSendMessageTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/client/ReSendMessageTest.java
index 2f70bf3..fb6f125 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/client/ReSendMessageTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/client/ReSendMessageTest.java
@@ -34,7 +34,7 @@ import org.apache.activemq.artemis.api.core.client.ActiveMQClient;
 import org.apache.activemq.artemis.api.jms.ActiveMQJMSConstants;
 import org.apache.activemq.artemis.api.jms.JMSFactoryType;
 import org.apache.activemq.artemis.tests.util.JMSTestBase;
-import org.apache.activemq.artemis.tests.util.UnitTestCase;
+import org.apache.activemq.artemis.tests.util.ServiceTestBase;
 import org.junit.After;
 import org.junit.Assert;
 import org.junit.Before;
@@ -71,7 +71,7 @@ public class ReSendMessageTest extends JMSTestBase
       {
          BytesMessage bm = sess.createBytesMessage();
          bm.setObjectProperty(ActiveMQJMSConstants.JMS_ACTIVEMQ_INPUT_STREAM,
-                              UnitTestCase.createFakeLargeStream(2 * ActiveMQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE));
+                              ServiceTestBase.createFakeLargeStream(2 * ActiveMQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE));
          msgs.add(bm);
 
          MapMessage mm = sess.createMapMessage();
@@ -168,7 +168,7 @@ public class ReSendMessageTest extends JMSTestBase
 
             for (int i = 0; i < copiedBytes.getBodyLength(); i++)
             {
-               Assert.assertEquals(UnitTestCase.getSamplebyte(i), copiedBytes.readByte());
+               Assert.assertEquals(ServiceTestBase.getSamplebyte(i), copiedBytes.readByte());
             }
          }
          else if (copiedMessage instanceof MapMessage)

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/99147d07/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/cluster/JMSReconnectTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/cluster/JMSReconnectTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/cluster/JMSReconnectTest.java
index 4434ea0..f991245 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/cluster/JMSReconnectTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/cluster/JMSReconnectTest.java
@@ -17,7 +17,7 @@
 package org.apache.activemq.artemis.tests.integration.jms.cluster;
 import org.apache.activemq.artemis.api.core.ActiveMQException;
 import org.apache.activemq.artemis.api.core.ActiveMQNotConnectedException;
-import org.apache.activemq.artemis.tests.util.UnitTestCase;
+import org.apache.activemq.artemis.tests.util.ServiceTestBase;
 import org.junit.Before;
 import org.junit.After;
 
@@ -54,7 +54,7 @@ import org.apache.activemq.artemis.jms.client.ActiveMQSession;
 import org.apache.activemq.artemis.spi.core.protocol.RemotingConnection;
 import org.apache.activemq.artemis.tests.util.RandomUtil;
 
-public class JMSReconnectTest extends UnitTestCase
+public class JMSReconnectTest extends ServiceTestBase
 {
 
    private ActiveMQServer liveService;

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/99147d07/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/connection/CloseConnectionOnGCTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/connection/CloseConnectionOnGCTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/connection/CloseConnectionOnGCTest.java
index 4d25c25..a47eb6a 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/connection/CloseConnectionOnGCTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/connection/CloseConnectionOnGCTest.java
@@ -16,7 +16,7 @@
  */
 package org.apache.activemq.artemis.tests.integration.jms.connection;
 import org.apache.activemq.artemis.tests.util.JMSTestBase;
-import org.apache.activemq.artemis.tests.util.UnitTestCase;
+import org.apache.activemq.artemis.tests.util.ServiceTestBase;
 import org.junit.Before;
 import org.junit.After;
 
@@ -93,7 +93,7 @@ public class CloseConnectionOnGCTest extends JMSTestBase
 
       conn = null;
 
-      UnitTestCase.checkWeakReferences(wr);
+      ServiceTestBase.checkWeakReferences(wr);
 
       latch.await(5000, TimeUnit.MILLISECONDS);
       Assert.assertEquals(0, server.getRemotingService().getConnections().size());
@@ -130,7 +130,7 @@ public class CloseConnectionOnGCTest extends JMSTestBase
       conn2 = null;
       conn3 = null;
 
-      UnitTestCase.checkWeakReferences(wr1, wr2, wr3);
+      ServiceTestBase.checkWeakReferences(wr1, wr2, wr3);
 
       latch.await(5000, TimeUnit.MILLISECONDS);
 
@@ -174,7 +174,7 @@ public class CloseConnectionOnGCTest extends JMSTestBase
       conn2 = null;
       conn3 = null;
 
-      UnitTestCase.checkWeakReferences(wr1, wr2, wr3);
+      ServiceTestBase.checkWeakReferences(wr1, wr2, wr3);
 
       latch.await(5000, TimeUnit.MILLISECONDS);
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/99147d07/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/connection/ExceptionListenerTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/connection/ExceptionListenerTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/connection/ExceptionListenerTest.java
index b89fa13..4f4724c 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/connection/ExceptionListenerTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/connection/ExceptionListenerTest.java
@@ -16,7 +16,7 @@
  */
 package org.apache.activemq.artemis.tests.integration.jms.connection;
 import org.apache.activemq.artemis.api.core.ActiveMQInternalErrorException;
-import org.apache.activemq.artemis.tests.util.UnitTestCase;
+import org.apache.activemq.artemis.tests.util.ServiceTestBase;
 import org.apache.activemq.artemis.core.registry.JndiBindingRegistry;
 import org.junit.Before;
 import org.junit.After;
@@ -50,7 +50,7 @@ import org.apache.activemq.artemis.tests.integration.jms.server.management.NullI
  *
  * A ExceptionListenerTest
  */
-public class ExceptionListenerTest extends UnitTestCase
+public class ExceptionListenerTest extends ServiceTestBase
 {
    private ActiveMQServer 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/jms/largemessage/JMSLargeMessageTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/largemessage/JMSLargeMessageTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/largemessage/JMSLargeMessageTest.java
index 11d40b1..8c63be5 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/largemessage/JMSLargeMessageTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/largemessage/JMSLargeMessageTest.java
@@ -31,7 +31,7 @@ import java.util.concurrent.atomic.AtomicInteger;
 import java.util.concurrent.atomic.AtomicLong;
 
 import org.apache.activemq.artemis.tests.util.JMSTestBase;
-import org.apache.activemq.artemis.tests.util.UnitTestCase;
+import org.apache.activemq.artemis.tests.util.ServiceTestBase;
 import org.apache.activemq.artemis.utils.UUIDGenerator;
 import org.junit.After;
 import org.junit.Assert;
@@ -86,7 +86,7 @@ public class JMSLargeMessageTest extends JMSTestBase
 
       BytesMessage m = session.createBytesMessage();
 
-      m.setObjectProperty("JMS_AMQ_InputStream", UnitTestCase.createFakeLargeStream(1024 * 1024));
+      m.setObjectProperty("JMS_AMQ_InputStream", ServiceTestBase.createFakeLargeStream(1024 * 1024));
 
       prod.send(m);
 
@@ -112,7 +112,7 @@ public class JMSLargeMessageTest extends JMSTestBase
          Assert.assertEquals(1024, numberOfBytes);
          for (int j = 0; j < 1024; j++)
          {
-            Assert.assertEquals(UnitTestCase.getSamplebyte(i + j), data[j]);
+            Assert.assertEquals(ServiceTestBase.getSamplebyte(i + j), data[j]);
          }
       }
 
@@ -130,7 +130,7 @@ public class JMSLargeMessageTest extends JMSTestBase
 
       BytesMessage m = session.createBytesMessage();
 
-      m.setObjectProperty("JMS_AMQ_InputStream", UnitTestCase.createFakeLargeStream(10));
+      m.setObjectProperty("JMS_AMQ_InputStream", ServiceTestBase.createFakeLargeStream(10));
 
       prod.send(m);
 
@@ -154,7 +154,7 @@ public class JMSLargeMessageTest extends JMSTestBase
       Assert.assertEquals(10, numberOfBytes);
       for (int j = 0; j < numberOfBytes; j++)
       {
-         Assert.assertEquals(UnitTestCase.getSamplebyte(j), data[j]);
+         Assert.assertEquals(ServiceTestBase.getSamplebyte(j), data[j]);
       }
 
       Assert.assertNotNull(rm);
@@ -171,7 +171,7 @@ public class JMSLargeMessageTest extends JMSTestBase
 
       try
       {
-         msg.setObjectProperty("JMS_AMQ_InputStream", UnitTestCase.createFakeLargeStream(10));
+         msg.setObjectProperty("JMS_AMQ_InputStream", ServiceTestBase.createFakeLargeStream(10));
          Assert.fail("Exception was expected");
       }
       catch (JMSException e)
@@ -232,7 +232,7 @@ public class JMSLargeMessageTest extends JMSTestBase
 
       BytesMessage m = session.createBytesMessage();
 
-      m.setObjectProperty("JMS_AMQ_InputStream", UnitTestCase.createFakeLargeStream(msgSize));
+      m.setObjectProperty("JMS_AMQ_InputStream", ServiceTestBase.createFakeLargeStream(msgSize));
 
       prod.send(m);
 
@@ -262,7 +262,7 @@ public class JMSLargeMessageTest extends JMSTestBase
          public void write(final int b) throws IOException
          {
             numberOfBytes.incrementAndGet();
-            if (UnitTestCase.getSamplebyte(position++) != b)
+            if (ServiceTestBase.getSamplebyte(position++) != b)
             {
                System.out.println("Wrong byte at position " + position);
                numberOfErrors.incrementAndGet();
@@ -273,7 +273,7 @@ public class JMSLargeMessageTest extends JMSTestBase
 
       try
       {
-         rm.setObjectProperty("JMS_AMQ_InputStream", UnitTestCase.createFakeLargeStream(100));
+         rm.setObjectProperty("JMS_AMQ_InputStream", ServiceTestBase.createFakeLargeStream(100));
          Assert.fail("Exception expected!");
       }
       catch (MessageNotWriteableException expected)

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/99147d07/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/server/JMSServerStartStopTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/server/JMSServerStartStopTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/server/JMSServerStartStopTest.java
index 5699bf2..88c67f7 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/server/JMSServerStartStopTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/server/JMSServerStartStopTest.java
@@ -29,7 +29,7 @@ import org.apache.activemq.artemis.api.core.TransportConfiguration;
 import org.apache.activemq.artemis.api.jms.ActiveMQJMSClient;
 import org.apache.activemq.artemis.api.jms.JMSFactoryType;
 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.config.FileDeploymentManager;
 import org.apache.activemq.artemis.core.config.impl.FileConfiguration;
 import org.apache.activemq.artemis.core.server.ActiveMQServer;
@@ -44,7 +44,7 @@ import org.junit.After;
 import org.junit.Assert;
 import org.junit.Test;
 
-public class JMSServerStartStopTest extends UnitTestCase
+public class JMSServerStartStopTest 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/jms/server/config/JMSConfigurationTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/server/config/JMSConfigurationTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/server/config/JMSConfigurationTest.java
index f341af2..048e710 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/server/config/JMSConfigurationTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/server/config/JMSConfigurationTest.java
@@ -56,7 +56,7 @@ public class JMSConfigurationTest extends ServiceTestBase
    {
       Context context = new InVMNamingContext();
 
-      Configuration coreConfiguration = createDefaultConfig(false);
+      Configuration coreConfiguration = createDefaultConfig();
       ActiveMQServer coreServer = new ActiveMQServerImpl(coreConfiguration);
 
       JMSConfiguration jmsConfiguration = new JMSConfigurationImpl();

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/99147d07/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/server/management/ConnectionFactoryControlTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/server/management/ConnectionFactoryControlTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/server/management/ConnectionFactoryControlTest.java
index 46be23c..d810dbf 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/server/management/ConnectionFactoryControlTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/server/management/ConnectionFactoryControlTest.java
@@ -23,7 +23,7 @@ import javax.management.Notification;
 import org.apache.activemq.artemis.tests.integration.management.ManagementControlHelper;
 import org.apache.activemq.artemis.tests.integration.management.ManagementTestBase;
 import org.apache.activemq.artemis.tests.unit.util.InVMNamingContext;
-import org.apache.activemq.artemis.tests.util.UnitTestCase;
+import org.apache.activemq.artemis.tests.util.ServiceTestBase;
 import org.apache.activemq.artemis.core.registry.JndiBindingRegistry;
 import org.junit.Assert;
 import org.junit.Before;
@@ -155,11 +155,11 @@ public class ConnectionFactoryControlTest extends ManagementTestBase
     */
    protected void startServer() throws Exception
    {
-      Configuration conf = createDefaultConfig(false)
-         .addConnectorConfiguration("invm", new TransportConfiguration(UnitTestCase.INVM_CONNECTOR_FACTORY))
+      Configuration conf = createDefaultConfig()
+         .addConnectorConfiguration("invm", new TransportConfiguration(INVM_CONNECTOR_FACTORY))
          .setSecurityEnabled(false)
          .setJMXManagementEnabled(true)
-         .addAcceptorConfiguration(new TransportConfiguration(UnitTestCase.INVM_ACCEPTOR_FACTORY));
+         .addAcceptorConfiguration(new TransportConfiguration(ServiceTestBase.INVM_ACCEPTOR_FACTORY));
       server = ActiveMQServers.newActiveMQServer(conf, mbeanServer, true);
       server.start();
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/99147d07/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/server/management/JMSQueueControlTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/server/management/JMSQueueControlTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/server/management/JMSQueueControlTest.java
index 558480b..6e61753 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/server/management/JMSQueueControlTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/server/management/JMSQueueControlTest.java
@@ -1388,7 +1388,8 @@ public class JMSQueueControlTest extends ManagementTestBase
 
       Configuration conf = createBasicConfig()
          .addAcceptorConfiguration(new TransportConfiguration(INVM_ACCEPTOR_FACTORY));
-      server = createServer(this.getName().contains("WithRealData"), conf, mbeanServer);
+      server = createServer(this.getName().contains("WithRealData"), conf);
+      server.setMBeanServer(mbeanServer);
 
       serverManager = new JMSServerManagerImpl(server);
       context = new InVMNamingContext();

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/99147d07/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/server/management/JMSServerControlRestartTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/server/management/JMSServerControlRestartTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/server/management/JMSServerControlRestartTest.java
index 014c5c1..9d4c8db 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/server/management/JMSServerControlRestartTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/server/management/JMSServerControlRestartTest.java
@@ -32,7 +32,7 @@ import org.apache.activemq.artemis.api.jms.management.JMSServerControl;
 import org.apache.activemq.artemis.tests.integration.management.ManagementControlHelper;
 import org.apache.activemq.artemis.tests.integration.management.ManagementTestBase;
 import org.apache.activemq.artemis.tests.unit.util.InVMNamingContext;
-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.registry.JndiBindingRegistry;
 import org.apache.activemq.artemis.core.remoting.impl.invm.InVMAcceptorFactory;
@@ -61,13 +61,13 @@ public class JMSServerControlRestartTest extends ManagementTestBase
       String queueName = RandomUtil.randomString();
       String binding = RandomUtil.randomString();
 
-      UnitTestCase.checkNoBinding(context, binding);
+      ServiceTestBase.checkNoBinding(context, binding);
       checkNoResource(ObjectNameBuilder.DEFAULT.getJMSQueueObjectName(queueName));
 
       JMSServerControl control = ManagementControlHelper.createJMSServerControl(mbeanServer);
       control.createQueue(queueName, binding);
 
-      Object o = UnitTestCase.checkBinding(context, binding);
+      Object o = ServiceTestBase.checkBinding(context, binding);
       Assert.assertTrue(o instanceof Queue);
       Queue queue = (Queue) o;
       Assert.assertEquals(queueName, queue.getQueueName());
@@ -75,13 +75,13 @@ public class JMSServerControlRestartTest extends ManagementTestBase
 
       serverManager.stop();
 
-      UnitTestCase.checkNoBinding(context, binding);
+      ServiceTestBase.checkNoBinding(context, binding);
       checkNoResource(ObjectNameBuilder.DEFAULT.getJMSQueueObjectName(queueName));
 
       serverManager = createJMSServer();
       serverManager.start();
 
-      o = UnitTestCase.checkBinding(context, binding);
+      o = ServiceTestBase.checkBinding(context, binding);
       Assert.assertTrue(o instanceof Queue);
       queue = (Queue) o;
       Assert.assertEquals(queueName, queue.getQueueName());
@@ -94,7 +94,7 @@ public class JMSServerControlRestartTest extends ManagementTestBase
       String queueName = RandomUtil.randomString();
       String binding = RandomUtil.randomString();
 
-      UnitTestCase.checkNoBinding(context, binding);
+      ServiceTestBase.checkNoBinding(context, binding);
       checkNoResource(ObjectNameBuilder.DEFAULT.getJMSQueueObjectName(queueName));
 
       TransportConfiguration config = new TransportConfiguration(InVMConnectorFactory.class.getName());
@@ -109,7 +109,7 @@ public class JMSServerControlRestartTest extends ManagementTestBase
       Assert.assertTrue(JMSManagementHelper.hasOperationSucceeded(reply));
       connection.close();
 
-      Object o = UnitTestCase.checkBinding(context, binding);
+      Object o = ServiceTestBase.checkBinding(context, binding);
       Assert.assertTrue(o instanceof Queue);
       Queue queue = (Queue) o;
       Assert.assertEquals(queueName, queue.getQueueName());
@@ -117,13 +117,13 @@ public class JMSServerControlRestartTest extends ManagementTestBase
 
       serverManager.stop();
 
-      UnitTestCase.checkNoBinding(context, binding);
+      ServiceTestBase.checkNoBinding(context, binding);
       checkNoResource(ObjectNameBuilder.DEFAULT.getJMSQueueObjectName(queueName));
 
       serverManager = createJMSServer();
       serverManager.start();
 
-      o = UnitTestCase.checkBinding(context, binding);
+      o = ServiceTestBase.checkBinding(context, binding);
       Assert.assertTrue(o instanceof Queue);
       queue = (Queue) o;
       Assert.assertEquals(queueName, queue.getQueueName());

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/99147d07/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/server/management/JMSServerControlTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/server/management/JMSServerControlTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/server/management/JMSServerControlTest.java
index 82a395c..2cecabb 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/server/management/JMSServerControlTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/server/management/JMSServerControlTest.java
@@ -51,7 +51,7 @@ import org.apache.activemq.artemis.api.jms.management.JMSServerControl;
 import org.apache.activemq.artemis.tests.integration.management.ManagementControlHelper;
 import org.apache.activemq.artemis.tests.integration.management.ManagementTestBase;
 import org.apache.activemq.artemis.tests.unit.util.InVMNamingContext;
-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.postoffice.QueueBinding;
 import org.apache.activemq.artemis.core.registry.JndiBindingRegistry;
@@ -134,22 +134,22 @@ public class JMSServerControlTest extends ManagementTestBase
       String queueName = RandomUtil.randomString();
 
       String bindingsCSV = JMSServerControlTest.toCSV(bindings);
-      UnitTestCase.checkNoBinding(context, bindingsCSV);
+      ServiceTestBase.checkNoBinding(context, bindingsCSV);
 
       checkNoResource(ObjectNameBuilder.DEFAULT.getJMSQueueObjectName(queueName));
 
       JMSServerControl control = createManagementControl();
       control.createQueue(queueName, bindingsCSV);
 
-      Object o = UnitTestCase.checkBinding(context, bindings[0]);
+      Object o = ServiceTestBase.checkBinding(context, bindings[0]);
       Assert.assertTrue(o instanceof Queue);
       Queue queue = (Queue) o;
       Assert.assertEquals(queueName, queue.getQueueName());
-      o = UnitTestCase.checkBinding(context, bindings[1]);
+      o = ServiceTestBase.checkBinding(context, bindings[1]);
       Assert.assertTrue(o instanceof Queue);
       queue = (Queue) o;
       Assert.assertEquals(queueName, queue.getQueueName());
-      o = UnitTestCase.checkBinding(context, bindings[2]);
+      o = ServiceTestBase.checkBinding(context, bindings[2]);
       Assert.assertTrue(o instanceof Queue);
       queue = (Queue) o;
       Assert.assertEquals(queueName, queue.getQueueName());
@@ -172,22 +172,22 @@ public class JMSServerControlTest extends ManagementTestBase
       String queueName = RandomUtil.randomString();
 
       String bindingsCSV = JMSServerControlTest.toCSV(bindings);
-      UnitTestCase.checkNoBinding(context, bindingsCSV);
+      ServiceTestBase.checkNoBinding(context, bindingsCSV);
 
       checkNoResource(ObjectNameBuilder.DEFAULT.getJMSQueueObjectName(queueName));
 
       JMSServerControl control = createManagementControl();
       control.createQueue(queueName, bindingsCSV);
 
-      Object o = UnitTestCase.checkBinding(context, "first,first");
+      Object o = ServiceTestBase.checkBinding(context, "first,first");
       Assert.assertTrue(o instanceof Queue);
       Queue queue = (Queue) o;
       Assert.assertEquals(queueName, queue.getQueueName());
-      o = UnitTestCase.checkBinding(context, "second,second");
+      o = ServiceTestBase.checkBinding(context, "second,second");
       Assert.assertTrue(o instanceof Queue);
       queue = (Queue) o;
       Assert.assertEquals(queueName, queue.getQueueName());
-      o = UnitTestCase.checkBinding(context, "third,third");
+      o = ServiceTestBase.checkBinding(context, "third,third");
       Assert.assertTrue(o instanceof Queue);
       queue = (Queue) o;
       Assert.assertEquals(queueName, queue.getQueueName());
@@ -210,7 +210,7 @@ public class JMSServerControlTest extends ManagementTestBase
       String queueName = RandomUtil.randomString();
 
       String bindingsCSV = JMSServerControlTest.toCSV(bindings);
-      UnitTestCase.checkNoBinding(context, bindingsCSV);
+      ServiceTestBase.checkNoBinding(context, bindingsCSV);
 
       checkNoResource(ObjectNameBuilder.DEFAULT.getJMSQueueObjectName(queueName));
 
@@ -218,7 +218,7 @@ public class JMSServerControlTest extends ManagementTestBase
       String selector = "foo='bar'";
       control.createQueue(queueName, bindingsCSV, selector);
 
-      Object o = UnitTestCase.checkBinding(context, bindings[0]);
+      Object o = ServiceTestBase.checkBinding(context, bindings[0]);
       Assert.assertTrue(o instanceof Queue);
       Queue queue = (Queue) o;
       // assertEquals(((ActiveMQDestination)queue).get);
@@ -228,7 +228,7 @@ public class JMSServerControlTest extends ManagementTestBase
          .getFilter()
          .getFilterString()
          .toString());
-      o = UnitTestCase.checkBinding(context, bindings[1]);
+      o = ServiceTestBase.checkBinding(context, bindings[1]);
       Assert.assertTrue(o instanceof Queue);
       queue = (Queue) o;
       Assert.assertEquals(queueName, queue.getQueueName());
@@ -237,7 +237,7 @@ public class JMSServerControlTest extends ManagementTestBase
          .getFilter()
          .getFilterString()
          .toString());
-      o = UnitTestCase.checkBinding(context, bindings[2]);
+      o = ServiceTestBase.checkBinding(context, bindings[2]);
       Assert.assertTrue(o instanceof Queue);
       queue = (Queue) o;
       Assert.assertEquals(queueName, queue.getQueueName());
@@ -261,13 +261,13 @@ public class JMSServerControlTest extends ManagementTestBase
       String queueName = RandomUtil.randomString();
       String binding = RandomUtil.randomString();
 
-      UnitTestCase.checkNoBinding(context, binding);
+      ServiceTestBase.checkNoBinding(context, binding);
       checkNoResource(ObjectNameBuilder.DEFAULT.getJMSQueueObjectName(queueName));
 
       JMSServerControl control = createManagementControl();
       control.createQueue(queueName, binding, null, false);
 
-      Object o = UnitTestCase.checkBinding(context, binding);
+      Object o = ServiceTestBase.checkBinding(context, binding);
       Assert.assertTrue(o instanceof Queue);
       Queue queue = (Queue) o;
       Assert.assertEquals(queueName, queue.getQueueName());
@@ -287,18 +287,18 @@ public class JMSServerControlTest extends ManagementTestBase
       String queueJNDIBinding = RandomUtil.randomString();
       String queueName = RandomUtil.randomString();
 
-      UnitTestCase.checkNoBinding(context, queueJNDIBinding);
+      ServiceTestBase.checkNoBinding(context, queueJNDIBinding);
       checkNoResource(ObjectNameBuilder.DEFAULT.getJMSQueueObjectName(queueName));
 
       JMSServerControl control = createManagementControl();
       control.createQueue(queueName, queueJNDIBinding);
 
-      UnitTestCase.checkBinding(context, queueJNDIBinding);
+      ServiceTestBase.checkBinding(context, queueJNDIBinding);
       checkResource(ObjectNameBuilder.DEFAULT.getJMSQueueObjectName(queueName));
 
       control.destroyQueue(queueName);
 
-      UnitTestCase.checkNoBinding(context, queueJNDIBinding);
+      ServiceTestBase.checkNoBinding(context, queueJNDIBinding);
       checkNoResource(ObjectNameBuilder.DEFAULT.getJMSQueueObjectName(queueName));
 
       Assert.assertNull(fakeJMSStorageManager.destinationMap.get(queueName));
@@ -310,17 +310,17 @@ public class JMSServerControlTest extends ManagementTestBase
       String queueJNDIBinding = RandomUtil.randomString();
       String queueName = RandomUtil.randomString();
 
-      UnitTestCase.checkNoBinding(context, queueJNDIBinding);
+      ServiceTestBase.checkNoBinding(context, queueJNDIBinding);
       checkNoResource(ObjectNameBuilder.DEFAULT.getJMSQueueObjectName(queueName));
 
       JMSServerControl control = createManagementControl();
       control.createQueue(queueName, queueJNDIBinding);
 
-      UnitTestCase.checkBinding(context, queueJNDIBinding);
+      ServiceTestBase.checkBinding(context, queueJNDIBinding);
       checkResource(ObjectNameBuilder.DEFAULT.getJMSQueueObjectName(queueName));
 
       ActiveMQConnectionFactory cf =
-         new ActiveMQConnectionFactory(false, new TransportConfiguration(UnitTestCase.INVM_CONNECTOR_FACTORY));
+         new ActiveMQConnectionFactory(false, new TransportConfiguration(INVM_CONNECTOR_FACTORY));
       ActiveMQConnection connection = (ActiveMQConnection) cf.createConnection();
       try
       {
@@ -330,7 +330,7 @@ public class JMSServerControlTest extends ManagementTestBase
 
          control.destroyQueue(queueName, true);
 
-         UnitTestCase.checkNoBinding(context, queueJNDIBinding);
+         ServiceTestBase.checkNoBinding(context, queueJNDIBinding);
          checkNoResource(ObjectNameBuilder.DEFAULT.getJMSQueueObjectName(queueName));
 
          Assert.assertNull(fakeJMSStorageManager.destinationMap.get(queueName));
@@ -367,16 +367,16 @@ public class JMSServerControlTest extends ManagementTestBase
       String queueJNDIBinding = RandomUtil.randomString();
       String queueName = RandomUtil.randomString();
 
-      UnitTestCase.checkNoBinding(context, queueJNDIBinding);
+      ServiceTestBase.checkNoBinding(context, queueJNDIBinding);
       checkNoResource(ObjectNameBuilder.DEFAULT.getJMSQueueObjectName(queueName));
 
       JMSServerControl control = createManagementControl();
       control.createQueue(queueName, queueJNDIBinding);
 
-      UnitTestCase.checkBinding(context, queueJNDIBinding);
+      ServiceTestBase.checkBinding(context, queueJNDIBinding);
       checkResource(ObjectNameBuilder.DEFAULT.getJMSQueueObjectName(queueName));
 
-      ActiveMQConnectionFactory cf = new ActiveMQConnectionFactory(false, new TransportConfiguration(UnitTestCase.INVM_CONNECTOR_FACTORY));
+      ActiveMQConnectionFactory cf = new ActiveMQConnectionFactory(false, new TransportConfiguration(INVM_CONNECTOR_FACTORY));
       ActiveMQConnection connection = (ActiveMQConnection) cf.createConnection();
       connection.start();
       try
@@ -397,7 +397,7 @@ public class JMSServerControlTest extends ManagementTestBase
             Assert.assertTrue(e.getMessage().startsWith("AMQ119025"));
          }
 
-         UnitTestCase.checkBinding(context, queueJNDIBinding);
+         ServiceTestBase.checkBinding(context, queueJNDIBinding);
          checkResource(ObjectNameBuilder.DEFAULT.getJMSQueueObjectName(queueName));
 
          Assert.assertNotNull(fakeJMSStorageManager.destinationMap.get(queueName));
@@ -422,16 +422,16 @@ public class JMSServerControlTest extends ManagementTestBase
       String topicJNDIBinding = RandomUtil.randomString();
       String topicName = RandomUtil.randomString();
 
-      UnitTestCase.checkNoBinding(context, topicJNDIBinding);
+      ServiceTestBase.checkNoBinding(context, topicJNDIBinding);
       checkNoResource(ObjectNameBuilder.DEFAULT.getJMSTopicObjectName(topicName));
 
       JMSServerControl control = createManagementControl();
       control.createTopic(topicName, topicJNDIBinding);
 
-      UnitTestCase.checkBinding(context, topicJNDIBinding);
+      ServiceTestBase.checkBinding(context, topicJNDIBinding);
       checkResource(ObjectNameBuilder.DEFAULT.getJMSTopicObjectName(topicName));
 
-      ActiveMQConnectionFactory cf = new ActiveMQConnectionFactory(false, new TransportConfiguration(UnitTestCase.INVM_CONNECTOR_FACTORY));
+      ActiveMQConnectionFactory cf = new ActiveMQConnectionFactory(false, new TransportConfiguration(INVM_CONNECTOR_FACTORY));
       ActiveMQConnection connection = (ActiveMQConnection) cf.createConnection();
       connection.start();
       try
@@ -452,7 +452,7 @@ public class JMSServerControlTest extends ManagementTestBase
             Assert.assertTrue(e.getMessage().startsWith("AMQ119025"));
          }
 
-         UnitTestCase.checkBinding(context, topicJNDIBinding);
+         ServiceTestBase.checkBinding(context, topicJNDIBinding);
          checkResource(ObjectNameBuilder.DEFAULT.getJMSTopicObjectName(topicName));
          Assert.assertFalse(cons.isClosed());
 
@@ -474,17 +474,17 @@ public class JMSServerControlTest extends ManagementTestBase
       String topicJNDIBinding = RandomUtil.randomString();
       String topicName = RandomUtil.randomString();
 
-      UnitTestCase.checkNoBinding(context, topicJNDIBinding);
+      ServiceTestBase.checkNoBinding(context, topicJNDIBinding);
       checkNoResource(ObjectNameBuilder.DEFAULT.getJMSTopicObjectName(topicName));
 
       JMSServerControl control = createManagementControl();
       control.createTopic(topicName, topicJNDIBinding);
 
-      UnitTestCase.checkBinding(context, topicJNDIBinding);
+      ServiceTestBase.checkBinding(context, topicJNDIBinding);
       checkResource(ObjectNameBuilder.DEFAULT.getJMSTopicObjectName(topicName));
 
       ActiveMQConnectionFactory cf =
-         new ActiveMQConnectionFactory(false, new TransportConfiguration(UnitTestCase.INVM_CONNECTOR_FACTORY));
+         new ActiveMQConnectionFactory(false, new TransportConfiguration(INVM_CONNECTOR_FACTORY));
       ActiveMQConnection connection = (ActiveMQConnection) cf.createConnection();
       try
       {
@@ -494,7 +494,7 @@ public class JMSServerControlTest extends ManagementTestBase
 
          control.destroyTopic(topicName, true);
 
-         UnitTestCase.checkNoBinding(context, topicJNDIBinding);
+         ServiceTestBase.checkNoBinding(context, topicJNDIBinding);
          checkNoResource(ObjectNameBuilder.DEFAULT.getJMSTopicObjectName(topicName));
 
          long time = System.currentTimeMillis();
@@ -529,17 +529,17 @@ public class JMSServerControlTest extends ManagementTestBase
       String queueJNDIBinding = RandomUtil.randomString();
       String queueName = RandomUtil.randomString();
 
-      UnitTestCase.checkNoBinding(context, queueJNDIBinding);
+      ServiceTestBase.checkNoBinding(context, queueJNDIBinding);
       checkNoResource(ObjectNameBuilder.DEFAULT.getJMSQueueObjectName(queueName));
 
       JMSServerControl control = createManagementControl();
       control.createQueue(queueName, queueJNDIBinding);
 
-      UnitTestCase.checkBinding(context, queueJNDIBinding);
+      ServiceTestBase.checkBinding(context, queueJNDIBinding);
       checkResource(ObjectNameBuilder.DEFAULT.getJMSQueueObjectName(queueName));
 
       ActiveMQConnectionFactory cf =
-         new ActiveMQConnectionFactory(false, new TransportConfiguration(UnitTestCase.NETTY_CONNECTOR_FACTORY));
+         new ActiveMQConnectionFactory(false, new TransportConfiguration(ServiceTestBase.NETTY_CONNECTOR_FACTORY));
       cf.setReconnectAttempts(-1);
       ActiveMQConnection connection = (ActiveMQConnection) cf.createConnection();
       try
@@ -550,7 +550,7 @@ public class JMSServerControlTest extends ManagementTestBase
 
          control.destroyQueue(queueName, true);
 
-         UnitTestCase.checkNoBinding(context, queueJNDIBinding);
+         ServiceTestBase.checkNoBinding(context, queueJNDIBinding);
          checkNoResource(ObjectNameBuilder.DEFAULT.getJMSQueueObjectName(queueName));
 
          Assert.assertNull(fakeJMSStorageManager.destinationMap.get(queueName));
@@ -610,24 +610,24 @@ public class JMSServerControlTest extends ManagementTestBase
       bindings[1] = RandomUtil.randomString();
       bindings[2] = RandomUtil.randomString();
       String topicJNDIBinding = JMSServerControlTest.toCSV(bindings);
-      UnitTestCase.checkNoBinding(context, topicJNDIBinding);
+      ServiceTestBase.checkNoBinding(context, topicJNDIBinding);
       String topicName = RandomUtil.randomString();
 
-      UnitTestCase.checkNoBinding(context, topicJNDIBinding);
+      ServiceTestBase.checkNoBinding(context, topicJNDIBinding);
       checkNoResource(ObjectNameBuilder.DEFAULT.getJMSTopicObjectName(topicName));
 
       JMSServerControl control = createManagementControl();
       control.createTopic(topicName, topicJNDIBinding);
 
-      Object o = UnitTestCase.checkBinding(context, bindings[0]);
+      Object o = ServiceTestBase.checkBinding(context, bindings[0]);
       Assert.assertTrue(o instanceof Topic);
       Topic topic = (Topic) o;
       Assert.assertEquals(topicName, topic.getTopicName());
-      o = UnitTestCase.checkBinding(context, bindings[1]);
+      o = ServiceTestBase.checkBinding(context, bindings[1]);
       Assert.assertTrue(o instanceof Topic);
       topic = (Topic) o;
       Assert.assertEquals(topicName, topic.getTopicName());
-      o = UnitTestCase.checkBinding(context, bindings[2]);
+      o = ServiceTestBase.checkBinding(context, bindings[2]);
       Assert.assertTrue(o instanceof Topic);
       topic = (Topic) o;
       Assert.assertEquals(topicName, topic.getTopicName());
@@ -646,7 +646,7 @@ public class JMSServerControlTest extends ManagementTestBase
       String topicJNDIBinding = RandomUtil.randomString();
       String topicName = RandomUtil.randomString();
 
-      UnitTestCase.checkNoBinding(context, topicJNDIBinding);
+      ServiceTestBase.checkNoBinding(context, topicJNDIBinding);
       checkNoResource(ObjectNameBuilder.DEFAULT.getJMSTopicObjectName(topicName));
 
       JMSServerControl control = createManagementControl();
@@ -673,7 +673,7 @@ public class JMSServerControlTest extends ManagementTestBase
       control.destroyTopic(topicName);
 
       Assert.assertNull(server.getManagementService().getResource(ResourceNames.CORE_ADDRESS + topicAddress));
-      UnitTestCase.checkNoBinding(context, topicJNDIBinding);
+      ServiceTestBase.checkNoBinding(context, topicJNDIBinding);
       checkNoResource(ObjectNameBuilder.DEFAULT.getJMSTopicObjectName(topicName));
 
       Assert.assertNull(fakeJMSStorageManager.destinationMap.get(topicName));
@@ -685,7 +685,7 @@ public class JMSServerControlTest extends ManagementTestBase
       String topicJNDIBinding = RandomUtil.randomString();
       String topicName = RandomUtil.randomString();
 
-      UnitTestCase.checkNoBinding(context, topicJNDIBinding);
+      ServiceTestBase.checkNoBinding(context, topicJNDIBinding);
       checkNoResource(ObjectNameBuilder.DEFAULT.getJMSTopicObjectName(topicName));
 
       JMSServerControl control = createManagementControl();
@@ -695,7 +695,7 @@ public class JMSServerControlTest extends ManagementTestBase
       Topic topic = (Topic) context.lookup(topicJNDIBinding);
       Assert.assertNotNull(topic);
       ActiveMQConnectionFactory cf =
-         new ActiveMQConnectionFactory(false, new TransportConfiguration(UnitTestCase.INVM_CONNECTOR_FACTORY));
+         new ActiveMQConnectionFactory(false, new TransportConfiguration(INVM_CONNECTOR_FACTORY));
       Connection connection = cf.createConnection();
       Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
       // create a consumer will create a Core queue bound to the topic address
@@ -722,7 +722,7 @@ public class JMSServerControlTest extends ManagementTestBase
       control.destroyTopic(topicName);
 
       Assert.assertNull(server.getManagementService().getResource(ResourceNames.CORE_ADDRESS + topicAddress));
-      UnitTestCase.checkNoBinding(context, topicJNDIBinding);
+      ServiceTestBase.checkNoBinding(context, topicJNDIBinding);
       checkNoResource(ObjectNameBuilder.DEFAULT.getJMSTopicObjectName(topicName));
 
       Assert.assertNull(fakeJMSStorageManager.destinationMap.get(topicName));
@@ -753,7 +753,7 @@ public class JMSServerControlTest extends ManagementTestBase
    {
       server.getConfiguration()
          .getConnectorConfigurations()
-         .put("tst", new TransportConfiguration(UnitTestCase.INVM_CONNECTOR_FACTORY));
+         .put("tst", new TransportConfiguration(INVM_CONNECTOR_FACTORY));
 
       doCreateConnectionFactory(new ConnectionFactoryCreator()
       {
@@ -930,7 +930,7 @@ public class JMSServerControlTest extends ManagementTestBase
 
       server.getConfiguration()
          .getConnectorConfigurations()
-         .put("tst", new TransportConfiguration(UnitTestCase.INVM_CONNECTOR_FACTORY));
+         .put("tst", new TransportConfiguration(INVM_CONNECTOR_FACTORY));
 
       control.createConnectionFactory(cfName, false, false, 3, "tst", cfJNDIBinding);
 
@@ -971,7 +971,7 @@ public class JMSServerControlTest extends ManagementTestBase
 
       server.getConfiguration()
          .getConnectorConfigurations()
-         .put("tst", new TransportConfiguration(UnitTestCase.INVM_CONNECTOR_FACTORY));
+         .put("tst", new TransportConfiguration(INVM_CONNECTOR_FACTORY));
 
       control.createConnectionFactory(cfName, false, false, 3, "tst", cfJNDIBinding);
 
@@ -1066,10 +1066,10 @@ public class JMSServerControlTest extends ManagementTestBase
    {
       Configuration conf = createBasicConfig()
          .setPersistenceEnabled(true)
-         .addAcceptorConfiguration(new TransportConfiguration(UnitTestCase.NETTY_ACCEPTOR_FACTORY))
-         .addAcceptorConfiguration(new TransportConfiguration(UnitTestCase.INVM_ACCEPTOR_FACTORY))
-         .addConnectorConfiguration("netty", new TransportConfiguration(UnitTestCase.NETTY_CONNECTOR_FACTORY))
-         .addConnectorConfiguration("invm", new TransportConfiguration(UnitTestCase.INVM_CONNECTOR_FACTORY));
+         .addAcceptorConfiguration(new TransportConfiguration(ServiceTestBase.NETTY_ACCEPTOR_FACTORY))
+         .addAcceptorConfiguration(new TransportConfiguration(ServiceTestBase.INVM_ACCEPTOR_FACTORY))
+         .addConnectorConfiguration("netty", new TransportConfiguration(ServiceTestBase.NETTY_CONNECTOR_FACTORY))
+         .addConnectorConfiguration("invm", new TransportConfiguration(INVM_CONNECTOR_FACTORY));
 
       server = addServer(ActiveMQServers.newActiveMQServer(conf, mbeanServer, true));
 
@@ -1130,7 +1130,7 @@ public class JMSServerControlTest extends ManagementTestBase
 
       for (Object cfJNDIBinding : cfJNDIBindings)
       {
-         UnitTestCase.checkNoBinding(context, cfJNDIBinding.toString());
+         ServiceTestBase.checkNoBinding(context, cfJNDIBinding.toString());
       }
       checkNoResource(ObjectNameBuilder.DEFAULT.getConnectionFactoryObjectName(cfName));
 
@@ -1139,7 +1139,7 @@ public class JMSServerControlTest extends ManagementTestBase
 
       for (Object cfJNDIBinding : cfJNDIBindings)
       {
-         Object o = UnitTestCase.checkBinding(context, cfJNDIBinding.toString());
+         Object o = ServiceTestBase.checkBinding(context, cfJNDIBinding.toString());
          Assert.assertTrue(o instanceof ConnectionFactory);
          ConnectionFactory cf = (ConnectionFactory) o;
          Connection connection = cf.createConnection();

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/99147d07/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/AIOImportExportTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/AIOImportExportTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/AIOImportExportTest.java
index bba40ff..4b3ea24 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/AIOImportExportTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/AIOImportExportTest.java
@@ -18,7 +18,7 @@ package org.apache.activemq.artemis.tests.integration.journal;
 
 import java.io.File;
 
-import org.apache.activemq.artemis.tests.util.UnitTestCase;
+import org.apache.activemq.artemis.tests.util.ServiceTestBase;
 import org.apache.activemq.artemis.core.journal.SequentialFileFactory;
 import org.apache.activemq.artemis.core.journal.impl.AIOSequentialFileFactory;
 import org.junit.BeforeClass;
@@ -36,7 +36,7 @@ public class AIOImportExportTest extends NIOImportExportTest
    {
       File file = new File(getTestDir());
 
-      UnitTestCase.deleteDirectory(file);
+      ServiceTestBase.deleteDirectory(file);
 
       file.mkdir();
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/99147d07/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/AIOJournalCompactTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/AIOJournalCompactTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/AIOJournalCompactTest.java
index f713267..dd63460 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/AIOJournalCompactTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/AIOJournalCompactTest.java
@@ -18,7 +18,7 @@ package org.apache.activemq.artemis.tests.integration.journal;
 
 import java.io.File;
 
-import org.apache.activemq.artemis.tests.util.UnitTestCase;
+import org.apache.activemq.artemis.tests.util.ServiceTestBase;
 import org.apache.activemq.artemis.core.journal.SequentialFileFactory;
 import org.apache.activemq.artemis.core.journal.impl.AIOSequentialFileFactory;
 import org.apache.activemq.artemis.core.journal.impl.JournalConstants;
@@ -37,7 +37,7 @@ public class AIOJournalCompactTest extends NIOJournalCompactTest
    {
       File file = new File(getTestDir());
 
-      UnitTestCase.deleteDirectory(file);
+      ServiceTestBase.deleteDirectory(file);
 
       file.mkdir();
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/99147d07/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/JournalPerfTuneTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/JournalPerfTuneTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/JournalPerfTuneTest.java
index 8c70ae8..02efaa3 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/JournalPerfTuneTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/JournalPerfTuneTest.java
@@ -21,7 +21,7 @@ import java.util.concurrent.atomic.AtomicLong;
 
 import org.apache.activemq.artemis.api.core.ActiveMQBuffer;
 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.journal.EncodingSupport;
 import org.apache.activemq.artemis.core.journal.IOCompletion;
 import org.apache.activemq.artemis.core.journal.Journal;
@@ -37,7 +37,7 @@ import org.junit.Ignore;
 import org.junit.Test;
 
 @Ignore
-public class JournalPerfTuneTest extends UnitTestCase
+public class JournalPerfTuneTest 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/journal/NIOBufferedJournalCompactTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/NIOBufferedJournalCompactTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/NIOBufferedJournalCompactTest.java
index 1e358f6..da39e88 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/NIOBufferedJournalCompactTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/NIOBufferedJournalCompactTest.java
@@ -18,7 +18,7 @@ package org.apache.activemq.artemis.tests.integration.journal;
 
 import java.io.File;
 
-import org.apache.activemq.artemis.tests.util.UnitTestCase;
+import org.apache.activemq.artemis.tests.util.ServiceTestBase;
 import org.apache.activemq.artemis.core.journal.SequentialFileFactory;
 import org.apache.activemq.artemis.core.journal.impl.NIOSequentialFileFactory;
 
@@ -30,7 +30,7 @@ public class NIOBufferedJournalCompactTest extends NIOJournalCompactTest
    {
       File file = new File(getTestDir());
 
-      UnitTestCase.deleteDirectory(file);
+      ServiceTestBase.deleteDirectory(file);
 
       file.mkdir();
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/99147d07/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/NIOImportExportTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/NIOImportExportTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/NIOImportExportTest.java
index a31ead7..66e001b 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/NIOImportExportTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/NIOImportExportTest.java
@@ -17,7 +17,7 @@
 package org.apache.activemq.artemis.tests.integration.journal;
 import org.apache.activemq.artemis.tests.unit.core.journal.impl.JournalImplTestBase;
 import org.apache.activemq.artemis.tests.unit.core.journal.impl.fakes.SimpleEncoding;
-import org.apache.activemq.artemis.tests.util.UnitTestCase;
+import org.apache.activemq.artemis.tests.util.ServiceTestBase;
 import org.junit.After;
 
 import org.junit.Test;
@@ -39,7 +39,7 @@ public class NIOImportExportTest extends JournalImplTestBase
    {
       File file = new File(getTestDir());
 
-      UnitTestCase.deleteDirectory(file);
+      ServiceTestBase.deleteDirectory(file);
 
       file.mkdir();
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/99147d07/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/NIOJournalCompactTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/NIOJournalCompactTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/NIOJournalCompactTest.java
index 028a8f3..acc98c8 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/NIOJournalCompactTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/NIOJournalCompactTest.java
@@ -48,7 +48,7 @@ import org.apache.activemq.artemis.core.persistence.impl.journal.OperationContex
 import org.apache.activemq.artemis.core.server.impl.ServerMessageImpl;
 import org.apache.activemq.artemis.tests.unit.core.journal.impl.JournalImplTestBase;
 import org.apache.activemq.artemis.tests.unit.core.journal.impl.fakes.SimpleEncoding;
-import org.apache.activemq.artemis.tests.util.UnitTestCase;
+import org.apache.activemq.artemis.tests.util.ServiceTestBase;
 import org.apache.activemq.artemis.utils.IDGenerator;
 import org.apache.activemq.artemis.utils.OrderedExecutorFactory;
 import org.apache.activemq.artemis.utils.SimpleIDGenerator;
@@ -556,7 +556,7 @@ public class NIOJournalCompactTest extends JournalImplTestBase
             System.out.println("Waiting on Compact");
             try
             {
-               UnitTestCase.waitForLatch(latchWait);
+               ServiceTestBase.waitForLatch(latchWait);
             }
             catch (InterruptedException e)
             {
@@ -650,7 +650,7 @@ public class NIOJournalCompactTest extends JournalImplTestBase
 
       t.start();
 
-      UnitTestCase.waitForLatch(latchDone);
+      ServiceTestBase.waitForLatch(latchDone);
 
       int nextID = NIOJournalCompactTest.NUMBER_OF_RECORDS;
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/99147d07/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/NIOJournalImplTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/NIOJournalImplTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/NIOJournalImplTest.java
index 660b9d5..e99775b 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/NIOJournalImplTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/NIOJournalImplTest.java
@@ -20,7 +20,7 @@ import java.io.File;
 
 import org.apache.activemq.artemis.tests.integration.IntegrationTestLogger;
 import org.apache.activemq.artemis.tests.unit.core.journal.impl.JournalImplTestUnit;
-import org.apache.activemq.artemis.tests.util.UnitTestCase;
+import org.apache.activemq.artemis.tests.util.ServiceTestBase;
 import org.apache.activemq.artemis.core.journal.SequentialFileFactory;
 import org.apache.activemq.artemis.core.journal.impl.NIOSequentialFileFactory;
 
@@ -35,7 +35,7 @@ public class NIOJournalImplTest extends JournalImplTestUnit
 
       NIOJournalImplTest.log.debug("deleting directory " + getTestDir());
 
-      UnitTestCase.deleteDirectory(file);
+      ServiceTestBase.deleteDirectory(file);
 
       file.mkdir();
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/99147d07/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/ValidateTransactionHealthTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/ValidateTransactionHealthTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/ValidateTransactionHealthTest.java
index e1a9160..95ce97c 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/ValidateTransactionHealthTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/ValidateTransactionHealthTest.java
@@ -21,7 +21,7 @@ import java.util.List;
 import java.util.concurrent.atomic.AtomicLong;
 
 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.asyncio.impl.AsynchronousFileImpl;
 import org.apache.activemq.artemis.core.journal.LoaderCallback;
 import org.apache.activemq.artemis.core.journal.PreparedTransactionInfo;
@@ -37,7 +37,7 @@ import org.junit.Test;
 /**
  * This test spawns a remote VM, as we want to "crash" the VM right after the journal is filled with data
  */
-public class ValidateTransactionHealthTest extends UnitTestCase
+public class ValidateTransactionHealthTest extends ServiceTestBase
 {
 
    private static final int OK = 10;

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/99147d07/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/largemessage/LargeMessageTestBase.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/largemessage/LargeMessageTestBase.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/largemessage/LargeMessageTestBase.java
index 801fce6..d80ee58 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/largemessage/LargeMessageTestBase.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/largemessage/LargeMessageTestBase.java
@@ -16,17 +16,6 @@
  */
 package org.apache.activemq.artemis.tests.integration.largemessage;
 
-import javax.transaction.xa.XAResource;
-import javax.transaction.xa.Xid;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.util.Random;
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.atomic.AtomicInteger;
-import java.util.concurrent.atomic.AtomicLong;
-
 import org.apache.activemq.artemis.api.core.ActiveMQBuffer;
 import org.apache.activemq.artemis.api.core.ActiveMQBuffers;
 import org.apache.activemq.artemis.api.core.ActiveMQException;
@@ -43,11 +32,21 @@ import org.apache.activemq.artemis.core.server.ActiveMQServer;
 import org.apache.activemq.artemis.core.server.Queue;
 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.utils.DataConstants;
 import org.apache.activemq.artemis.utils.DeflaterReader;
 import org.junit.Assert;
 
+import javax.transaction.xa.XAResource;
+import javax.transaction.xa.Xid;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.util.Random;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.atomic.AtomicInteger;
+import java.util.concurrent.atomic.AtomicLong;
+
 public abstract class LargeMessageTestBase extends ServiceTestBase
 {
 
@@ -300,7 +299,7 @@ public abstract class LargeMessageTestBase extends ServiceTestBase
                               @Override
                               public void write(final byte[] b) throws IOException
                               {
-                                 if (b[0] == UnitTestCase.getSamplebyte(bytesRead.get()))
+                                 if (b[0] == ServiceTestBase.getSamplebyte(bytesRead.get()))
                                  {
                                     bytesRead.addAndGet(b.length);
                                     LargeMessageTestBase.log.debug("Read position " + bytesRead.get() + " on consumer");
@@ -314,7 +313,7 @@ public abstract class LargeMessageTestBase extends ServiceTestBase
                               @Override
                               public void write(final int b) throws IOException
                               {
-                                 if (b == UnitTestCase.getSamplebyte(bytesRead.get()))
+                                 if (b == ServiceTestBase.getSamplebyte(bytesRead.get()))
                                  {
                                     bytesRead.incrementAndGet();
                                  }
@@ -339,7 +338,7 @@ public abstract class LargeMessageTestBase extends ServiceTestBase
                                  LargeMessageTestBase.log.debug("Read " + b + " bytes");
                               }
 
-                              Assert.assertEquals(UnitTestCase.getSamplebyte(b), buffer.readByte());
+                              Assert.assertEquals(ServiceTestBase.getSamplebyte(b), buffer.readByte());
                            }
 
                            try
@@ -419,7 +418,7 @@ public abstract class LargeMessageTestBase extends ServiceTestBase
                         @Override
                         public void write(final byte[] b) throws IOException
                         {
-                           if (b[0] == UnitTestCase.getSamplebyte(bytesRead.get()))
+                           if (b[0] == ServiceTestBase.getSamplebyte(bytesRead.get()))
                            {
                               bytesRead.addAndGet(b.length);
                            }
@@ -461,7 +460,7 @@ public abstract class LargeMessageTestBase extends ServiceTestBase
                         {
                            LargeMessageTestBase.log.debug("Read " + b + " bytes");
                         }
-                        Assert.assertEquals(UnitTestCase.getSamplebyte(b), buffer.readByte());
+                        Assert.assertEquals(ServiceTestBase.getSamplebyte(b), buffer.readByte());
                      }
                   }
 
@@ -547,7 +546,7 @@ public abstract class LargeMessageTestBase extends ServiceTestBase
          if (numberOfBytes > 1024 * 1024 || i % 2 == 0)
          {
             LargeMessageTestBase.log.debug("Sending message (stream)" + i);
-            message.setBodyInputStream(UnitTestCase.createFakeLargeStream(numberOfBytes));
+            message.setBodyInputStream(ServiceTestBase.createFakeLargeStream(numberOfBytes));
          }
          else
          {
@@ -555,7 +554,7 @@ public abstract class LargeMessageTestBase extends ServiceTestBase
             byte[] bytes = new byte[(int) numberOfBytes];
             for (int j = 0; j < bytes.length; j++)
             {
-               bytes[j] = UnitTestCase.getSamplebyte(j);
+               bytes[j] = ServiceTestBase.getSamplebyte(j);
             }
             message.getBodyBuffer().writeBytes(bytes);
          }
@@ -607,7 +606,7 @@ public abstract class LargeMessageTestBase extends ServiceTestBase
 
       ClientMessage clientMessage = session.createMessage(persistent);
 
-      clientMessage.setBodyInputStream(UnitTestCase.createFakeLargeStream(numberOfBytes));
+      clientMessage.setBodyInputStream(ServiceTestBase.createFakeLargeStream(numberOfBytes));
 
       return clientMessage;
    }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/99147d07/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/largemessage/ServerLargeMessageTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/largemessage/ServerLargeMessageTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/largemessage/ServerLargeMessageTest.java
index e2c1114..83aa6d5 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/largemessage/ServerLargeMessageTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/largemessage/ServerLargeMessageTest.java
@@ -17,14 +17,13 @@
 package org.apache.activemq.artemis.tests.integration.largemessage;
 
 import org.apache.activemq.artemis.api.core.Message;
+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.persistence.impl.journal.JournalStorageManager;
 import org.apache.activemq.artemis.core.persistence.impl.journal.LargeServerMessageImpl;
 import org.apache.activemq.artemis.core.server.ActiveMQServer;
@@ -67,7 +66,7 @@ public class ServerLargeMessageTest extends ServiceTestBase
 
          for (int i = 0; i < 2 * ActiveMQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE; i++)
          {
-            fileMessage.addBytes(new byte[]{UnitTestCase.getSamplebyte(i)});
+            fileMessage.addBytes(new byte[]{ServiceTestBase.getSamplebyte(i)});
          }
          // The server would be doing this
          fileMessage.putLongProperty(Message.HDR_LARGE_BODY_SIZE, 2 * ActiveMQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE);
@@ -97,7 +96,7 @@ public class ServerLargeMessageTest extends ServiceTestBase
 
          for (int i = 0; i < 2 * ActiveMQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE; i++)
          {
-            Assert.assertEquals(UnitTestCase.getSamplebyte(i), msg.getBodyBuffer().readByte());
+            Assert.assertEquals(ServiceTestBase.getSamplebyte(i), msg.getBodyBuffer().readByte());
          }
 
          msg.acknowledge();

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/99147d07/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/AcceptorControlTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/AcceptorControlTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/AcceptorControlTest.java
index a89d615..1f73935 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/AcceptorControlTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/AcceptorControlTest.java
@@ -53,7 +53,8 @@ public class AcceptorControlTest extends ManagementTestBase
 
       Configuration conf = createBasicConfig()
          .addAcceptorConfiguration(acceptorConfig);
-      ActiveMQServer service = createServer(false, conf, mbeanServer);
+      ActiveMQServer service = createServer(false, conf);
+      service.setMBeanServer(mbeanServer);
       service.start();
 
       AcceptorControl acceptorControl = createManagementControl(acceptorConfig.getName());
@@ -70,7 +71,8 @@ public class AcceptorControlTest extends ManagementTestBase
                                                                          RandomUtil.randomString());
       Configuration conf = createBasicConfig()
          .addAcceptorConfiguration(acceptorConfig);
-      ActiveMQServer service = createServer(false, conf, mbeanServer);
+      ActiveMQServer service = createServer(false, conf);
+      service.setMBeanServer(mbeanServer);
       service.start();
 
       AcceptorControl acceptorControl = createManagementControl(acceptorConfig.getName());
@@ -129,7 +131,8 @@ public class AcceptorControlTest extends ManagementTestBase
                                                                          RandomUtil.randomString());
       Configuration conf = createBasicConfig()
          .addAcceptorConfiguration(acceptorConfig);
-      ActiveMQServer service = createServer(false, conf, mbeanServer);
+      ActiveMQServer service = createServer(false, conf);
+      service.setMBeanServer(mbeanServer);
       service.start();
 
       AcceptorControl acceptorControl = createManagementControl(acceptorConfig.getName());

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/99147d07/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/AcceptorControlUsingCoreTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/AcceptorControlUsingCoreTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/AcceptorControlUsingCoreTest.java
index 9b600a4..259360b 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/AcceptorControlUsingCoreTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/AcceptorControlUsingCoreTest.java
@@ -16,18 +16,14 @@
  */
 package org.apache.activemq.artemis.tests.integration.management;
 
-import org.junit.Test;
-
-import java.util.Map;
-
-import org.apache.activemq.artemis.api.core.TransportConfiguration;
 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.api.core.management.AcceptorControl;
 import org.apache.activemq.artemis.api.core.management.ResourceNames;
-import org.apache.activemq.artemis.tests.util.UnitTestCase;
+import org.junit.Test;
+
+import java.util.Map;
 
 public class AcceptorControlUsingCoreTest extends AcceptorControlTest
 {
@@ -47,7 +43,7 @@ public class AcceptorControlUsingCoreTest extends AcceptorControlTest
    @Override
    protected AcceptorControl createManagementControl(final String name) throws Exception
    {
-      ServerLocator locator = ActiveMQClient.createServerLocatorWithoutHA(new TransportConfiguration(UnitTestCase.INVM_CONNECTOR_FACTORY));
+      ServerLocator locator = createInVMNonHALocator();
       addServerLocator(locator);
       ClientSessionFactory sf = createSessionFactory(locator);
       session = sf.createSession(false, true, true);


Mime
View raw message