activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From clebertsuco...@apache.org
Subject [02/21] activemq-artemis git commit: More test-suite refactoring
Date Thu, 28 May 2015 15:18:53 GMT
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/328611fd/tests/stress-tests/src/test/java/org/apache/activemq/artemis/tests/stress/journal/LargeJournalStressTest.java
----------------------------------------------------------------------
diff --git a/tests/stress-tests/src/test/java/org/apache/activemq/artemis/tests/stress/journal/LargeJournalStressTest.java b/tests/stress-tests/src/test/java/org/apache/activemq/artemis/tests/stress/journal/LargeJournalStressTest.java
index aef8924..7c092bb 100644
--- a/tests/stress-tests/src/test/java/org/apache/activemq/artemis/tests/stress/journal/LargeJournalStressTest.java
+++ b/tests/stress-tests/src/test/java/org/apache/activemq/artemis/tests/stress/journal/LargeJournalStressTest.java
@@ -26,7 +26,7 @@ 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.JournalType;
-import org.apache.activemq.artemis.tests.util.ServiceTestBase;
+import org.apache.activemq.artemis.tests.util.ActiveMQTestBase;
 import org.junit.After;
 import org.junit.Assert;
 import org.junit.Before;
@@ -35,7 +35,7 @@ import org.junit.Test;
 import java.util.concurrent.CountDownLatch;
 import java.util.concurrent.atomic.AtomicInteger;
 
-public class LargeJournalStressTest extends ServiceTestBase
+public class LargeJournalStressTest extends ActiveMQTestBase
 {
 
    // Constants -----------------------------------------------------
@@ -103,7 +103,7 @@ public class LargeJournalStressTest extends ServiceTestBase
             latchReady.countDown();
             try
             {
-               ServiceTestBase.waitForLatch(latchStart);
+               ActiveMQTestBase.waitForLatch(latchStart);
                session = sf.createSession(true, true);
                sessionSlow = sf.createSession(false, false);
                ClientProducer prod = session.createProducer(LargeJournalStressTest.AD2);
@@ -169,7 +169,7 @@ public class LargeJournalStressTest extends ServiceTestBase
             latchReady.countDown();
             try
             {
-               ServiceTestBase.waitForLatch(latchStart);
+               ActiveMQTestBase.waitForLatch(latchStart);
                session = sf.createSession(true, true);
                session.start();
                ClientConsumer cons = session.createConsumer(LargeJournalStressTest.Q2);
@@ -205,7 +205,7 @@ public class LargeJournalStressTest extends ServiceTestBase
       FastProducer p1 = new FastProducer();
       p1.start();
 
-      ServiceTestBase.waitForLatch(latchReady);
+      ActiveMQTestBase.waitForLatch(latchReady);
       latchStart.countDown();
 
       p1.join();
@@ -261,12 +261,10 @@ public class LargeJournalStressTest extends ServiceTestBase
 
       clearDataRecreateServerDirs();
 
-      locator = createInVMNonHALocator();
-
-      locator.setBlockOnAcknowledge(false);
-      locator.setBlockOnNonDurableSend(false);
-      locator.setBlockOnDurableSend(false);
-
+      locator = createInVMNonHALocator()
+              .setBlockOnAcknowledge(false)
+              .setBlockOnNonDurableSend(false)
+              .setBlockOnDurableSend(false);
    }
 
    /**
@@ -274,7 +272,7 @@ public class LargeJournalStressTest extends ServiceTestBase
     */
    private void setupServer(final JournalType journalType) throws Exception
    {
-      Configuration config = createDefaultConfig()
+      Configuration config = createDefaultInVMConfig()
          .setJournalSyncNonTransactional(false)
          .setJournalFileSize(ActiveMQDefaultConfiguration.getDefaultJournalFileSize())
          .setJournalType(journalType)

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/328611fd/tests/stress-tests/src/test/java/org/apache/activemq/artemis/tests/stress/journal/MultiThreadConsumerStressTest.java
----------------------------------------------------------------------
diff --git a/tests/stress-tests/src/test/java/org/apache/activemq/artemis/tests/stress/journal/MultiThreadConsumerStressTest.java b/tests/stress-tests/src/test/java/org/apache/activemq/artemis/tests/stress/journal/MultiThreadConsumerStressTest.java
index 3f13c3e..b340ac0 100644
--- a/tests/stress-tests/src/test/java/org/apache/activemq/artemis/tests/stress/journal/MultiThreadConsumerStressTest.java
+++ b/tests/stress-tests/src/test/java/org/apache/activemq/artemis/tests/stress/journal/MultiThreadConsumerStressTest.java
@@ -27,7 +27,7 @@ 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.JournalType;
-import org.apache.activemq.artemis.tests.util.ServiceTestBase;
+import org.apache.activemq.artemis.tests.util.ActiveMQTestBase;
 import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Test;
@@ -40,7 +40,7 @@ import java.util.concurrent.CountDownLatch;
  * <p/>
  * This test validates consuming / sending messages while compacting is working
  */
-public class MultiThreadConsumerStressTest extends ServiceTestBase
+public class MultiThreadConsumerStressTest extends ActiveMQTestBase
 {
 
    // Constants -----------------------------------------------------
@@ -112,7 +112,7 @@ public class MultiThreadConsumerStressTest extends ServiceTestBase
          threads.add(cons[i]);
       }
 
-      ServiceTestBase.waitForLatch(latchReady);
+      ActiveMQTestBase.waitForLatch(latchReady);
       latchStart.countDown();
 
       for (BaseThread t : threads)
@@ -154,7 +154,7 @@ public class MultiThreadConsumerStressTest extends ServiceTestBase
 
    private void setupServer(final JournalType journalType) throws Exception
    {
-      Configuration config = createDefaultConfig(true)
+      Configuration config = createDefaultNettyConfig()
          .setJournalType(journalType)
          .setJournalFileSize(ActiveMQDefaultConfiguration.getDefaultJournalFileSize())
          .setJournalMinFiles(ActiveMQDefaultConfiguration.getDefaultJournalMinFiles())
@@ -165,13 +165,10 @@ public class MultiThreadConsumerStressTest extends ServiceTestBase
 
       server.start();
 
-      ServerLocator locator = createNettyNonHALocator();
-
-      locator.setBlockOnDurableSend(false);
-
-      locator.setBlockOnNonDurableSend(false);
-
-      locator.setBlockOnAcknowledge(false);
+      ServerLocator locator = createNettyNonHALocator()
+              .setBlockOnDurableSend(false)
+              .setBlockOnNonDurableSend(false)
+              .setBlockOnAcknowledge(false);
 
       sf = createSessionFactory(locator);
 
@@ -242,7 +239,7 @@ public class MultiThreadConsumerStressTest extends ServiceTestBase
          latchReady.countDown();
          try
          {
-            ServiceTestBase.waitForLatch(latchStart);
+            ActiveMQTestBase.waitForLatch(latchStart);
             session = sf.createSession(false, false);
             ClientProducer prod = session.createProducer(ADDRESS);
             for (int i = 0; i < numberOfMessages; i++)
@@ -303,7 +300,7 @@ public class MultiThreadConsumerStressTest extends ServiceTestBase
          latchReady.countDown();
          try
          {
-            ServiceTestBase.waitForLatch(latchStart);
+            ActiveMQTestBase.waitForLatch(latchStart);
             session = sf.createSession(false, false);
             session.start();
             ClientConsumer cons = session.createConsumer(QUEUE);

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/328611fd/tests/stress-tests/src/test/java/org/apache/activemq/artemis/tests/stress/journal/NIOMultiThreadCompactorStressTest.java
----------------------------------------------------------------------
diff --git a/tests/stress-tests/src/test/java/org/apache/activemq/artemis/tests/stress/journal/NIOMultiThreadCompactorStressTest.java b/tests/stress-tests/src/test/java/org/apache/activemq/artemis/tests/stress/journal/NIOMultiThreadCompactorStressTest.java
index 0a85c53..3a7a99c 100644
--- a/tests/stress-tests/src/test/java/org/apache/activemq/artemis/tests/stress/journal/NIOMultiThreadCompactorStressTest.java
+++ b/tests/stress-tests/src/test/java/org/apache/activemq/artemis/tests/stress/journal/NIOMultiThreadCompactorStressTest.java
@@ -33,7 +33,7 @@ import org.apache.activemq.artemis.core.journal.impl.JournalImpl;
 import org.apache.activemq.artemis.core.journal.impl.NIOSequentialFileFactory;
 import org.apache.activemq.artemis.core.server.ActiveMQServer;
 import org.apache.activemq.artemis.core.server.JournalType;
-import org.apache.activemq.artemis.tests.util.ServiceTestBase;
+import org.apache.activemq.artemis.tests.util.ActiveMQTestBase;
 import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Test;
@@ -44,7 +44,7 @@ import java.util.ArrayList;
 import java.util.List;
 import java.util.concurrent.CountDownLatch;
 
-public class NIOMultiThreadCompactorStressTest extends ServiceTestBase
+public class NIOMultiThreadCompactorStressTest extends ActiveMQTestBase
 {
 
    // Constants -----------------------------------------------------
@@ -72,10 +72,9 @@ public class NIOMultiThreadCompactorStressTest extends ServiceTestBase
    {
       super.setUp();
 
-      locator = createInVMNonHALocator();
-      locator.setBlockOnNonDurableSend(false);
-      locator.setBlockOnAcknowledge(false);
-
+      locator = createInVMNonHALocator()
+              .setBlockOnNonDurableSend(false)
+              .setBlockOnAcknowledge(false);
    }
 
    @Test
@@ -230,7 +229,7 @@ public class NIOMultiThreadCompactorStressTest extends ServiceTestBase
          threads.add(cons[i]);
       }
 
-      ServiceTestBase.waitForLatch(latchReady);
+      ActiveMQTestBase.waitForLatch(latchReady);
       latchStart.countDown();
 
       for (BaseThread t : threads)
@@ -345,7 +344,7 @@ public class NIOMultiThreadCompactorStressTest extends ServiceTestBase
       }
       if (server == null)
       {
-         Configuration config = createDefaultConfig(true)
+         Configuration config = createDefaultNettyConfig()
             .setJournalFileSize(ActiveMQDefaultConfiguration.getDefaultJournalFileSize())
             .setJournalType(journalType)
             .setJMXManagementEnabled(false)
@@ -364,9 +363,9 @@ public class NIOMultiThreadCompactorStressTest extends ServiceTestBase
 
       server.start();
 
-      ServerLocator locator = createNettyNonHALocator();
-      locator.setBlockOnDurableSend(false);
-      locator.setBlockOnAcknowledge(false);
+      ServerLocator locator = createNettyNonHALocator()
+              .setBlockOnDurableSend(false)
+              .setBlockOnAcknowledge(false);
 
       sf = createSessionFactory(locator);
 
@@ -439,7 +438,7 @@ public class NIOMultiThreadCompactorStressTest extends ServiceTestBase
          latchReady.countDown();
          try
          {
-            ServiceTestBase.waitForLatch(latchStart);
+            ActiveMQTestBase.waitForLatch(latchStart);
             session = sf.createSession(!transactional, !transactional);
             ClientProducer prod = session.createProducer(ADDRESS);
             for (int i = 0; i < numberOfMessages; i++)
@@ -508,7 +507,7 @@ public class NIOMultiThreadCompactorStressTest extends ServiceTestBase
          latchReady.countDown();
          try
          {
-            ServiceTestBase.waitForLatch(latchStart);
+            ActiveMQTestBase.waitForLatch(latchStart);
             session = sf.createSession(!transactional, !transactional);
             session.start();
             ClientConsumer cons = session.createConsumer(QUEUE);

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/328611fd/tests/stress-tests/src/test/java/org/apache/activemq/artemis/tests/stress/journal/XmlImportExportStressTest.java
----------------------------------------------------------------------
diff --git a/tests/stress-tests/src/test/java/org/apache/activemq/artemis/tests/stress/journal/XmlImportExportStressTest.java b/tests/stress-tests/src/test/java/org/apache/activemq/artemis/tests/stress/journal/XmlImportExportStressTest.java
index 1f10fd5..cec1704 100644
--- a/tests/stress-tests/src/test/java/org/apache/activemq/artemis/tests/stress/journal/XmlImportExportStressTest.java
+++ b/tests/stress-tests/src/test/java/org/apache/activemq/artemis/tests/stress/journal/XmlImportExportStressTest.java
@@ -30,10 +30,10 @@ import org.apache.activemq.artemis.api.core.client.ServerLocator;
 import org.apache.activemq.artemis.cli.commands.tools.XmlDataExporter;
 import org.apache.activemq.artemis.cli.commands.tools.XmlDataImporter;
 import org.apache.activemq.artemis.core.server.ActiveMQServer;
-import org.apache.activemq.artemis.tests.util.ServiceTestBase;
+import org.apache.activemq.artemis.tests.util.ActiveMQTestBase;
 import org.junit.Test;
 
-public class XmlImportExportStressTest extends ServiceTestBase
+public class XmlImportExportStressTest extends ActiveMQTestBase
 {
    public static final int CONSUMER_TIMEOUT = 5000;
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/328611fd/tests/stress-tests/src/test/java/org/apache/activemq/artemis/tests/stress/paging/MultipleConsumersPageStressTest.java
----------------------------------------------------------------------
diff --git a/tests/stress-tests/src/test/java/org/apache/activemq/artemis/tests/stress/paging/MultipleConsumersPageStressTest.java b/tests/stress-tests/src/test/java/org/apache/activemq/artemis/tests/stress/paging/MultipleConsumersPageStressTest.java
index 57d2949..19db2ca 100644
--- a/tests/stress-tests/src/test/java/org/apache/activemq/artemis/tests/stress/paging/MultipleConsumersPageStressTest.java
+++ b/tests/stress-tests/src/test/java/org/apache/activemq/artemis/tests/stress/paging/MultipleConsumersPageStressTest.java
@@ -15,17 +15,6 @@
  * limitations under the License.
  */
 package org.apache.activemq.artemis.tests.stress.paging;
-import org.junit.Before;
-import org.junit.After;
-
-import org.junit.Test;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Random;
-import java.util.concurrent.atomic.AtomicInteger;
-
-import org.junit.Assert;
 
 import org.apache.activemq.artemis.api.core.SimpleString;
 import org.apache.activemq.artemis.api.core.client.ClientConsumer;
@@ -34,14 +23,21 @@ 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.core.config.Configuration;
 import org.apache.activemq.artemis.core.server.ActiveMQServer;
 import org.apache.activemq.artemis.core.server.impl.QueueImpl;
 import org.apache.activemq.artemis.core.settings.impl.AddressSettings;
 import org.apache.activemq.artemis.tests.unit.UnitTestLogger;
-import org.apache.activemq.artemis.tests.util.ServiceTestBase;
+import org.apache.activemq.artemis.tests.util.ActiveMQTestBase;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Random;
+import java.util.concurrent.atomic.AtomicInteger;
 
-public class MultipleConsumersPageStressTest extends ServiceTestBase
+public class MultipleConsumersPageStressTest extends ActiveMQTestBase
 {
 
    private final UnitTestLogger log = UnitTestLogger.LOGGER;
@@ -64,7 +60,7 @@ public class MultipleConsumersPageStressTest extends ServiceTestBase
 
    private boolean openConsumerOnEveryLoop = true;
 
-   private ActiveMQServer messagingService;
+   private ActiveMQServer server;
 
    private ServerLocator sharedLocator;
 
@@ -90,8 +86,8 @@ public class MultipleConsumersPageStressTest extends ServiceTestBase
       numberOfProducers = 1;
       numberOfConsumers = 1;
 
-      sharedLocator = createInVMNonHALocator();
-      sharedLocator.setConsumerWindowSize(0);
+      sharedLocator = createInVMNonHALocator()
+              .setConsumerWindowSize(0);
 
       sharedSf = createSessionFactory(sharedLocator);
 
@@ -103,33 +99,14 @@ public class MultipleConsumersPageStressTest extends ServiceTestBase
    public void setUp() throws Exception
    {
       super.setUp();
-      Configuration config = createDefaultConfig();
 
       HashMap<String, AddressSettings> settings = new HashMap<String, AddressSettings>();
 
-      messagingService = createServer(true, config, 10024, 200024, settings);
-      messagingService.start();
-
-      pagedServerQueue = (QueueImpl)messagingService.createQueue(ADDRESS, ADDRESS, null, true, false);
+      server = createServer(true, createDefaultInVMConfig(), 10024, 200024, settings);
+      server.start();
 
-   }
+      pagedServerQueue = (QueueImpl) server.createQueue(ADDRESS, ADDRESS, null, true, false);
 
-   @Override
-   @After
-   public void tearDown() throws Exception
-   {
-      for (Tester tst : producers)
-      {
-         tst.close();
-      }
-      for (Tester tst : consumers)
-      {
-         tst.close();
-      }
-      sharedSf.close();
-      sharedLocator.close();
-      messagingService.stop();
-      super.tearDown();
    }
 
    @Test
@@ -158,8 +135,8 @@ public class MultipleConsumersPageStressTest extends ServiceTestBase
       numberOfProducers = 1;
       numberOfConsumers = 1;
 
-      sharedLocator = createInVMNonHALocator();
-      sharedLocator.setConsumerWindowSize(0);
+      sharedLocator = createInVMNonHALocator()
+              .setConsumerWindowSize(0);
 
       sharedSf = createSessionFactory(sharedLocator);
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/328611fd/tests/stress-tests/src/test/java/org/apache/activemq/artemis/tests/stress/paging/PageCursorStressTest.java
----------------------------------------------------------------------
diff --git a/tests/stress-tests/src/test/java/org/apache/activemq/artemis/tests/stress/paging/PageCursorStressTest.java b/tests/stress-tests/src/test/java/org/apache/activemq/artemis/tests/stress/paging/PageCursorStressTest.java
index e1d478a..42af267 100644
--- a/tests/stress-tests/src/test/java/org/apache/activemq/artemis/tests/stress/paging/PageCursorStressTest.java
+++ b/tests/stress-tests/src/test/java/org/apache/activemq/artemis/tests/stress/paging/PageCursorStressTest.java
@@ -16,18 +16,8 @@
  */
 package org.apache.activemq.artemis.tests.stress.paging;
 
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.concurrent.atomic.AtomicInteger;
-import java.util.concurrent.locks.ReentrantReadWriteLock;
-import java.util.concurrent.locks.ReentrantReadWriteLock.ReadLock;
-
 import org.apache.activemq.artemis.api.core.ActiveMQBuffer;
 import org.apache.activemq.artemis.api.core.SimpleString;
-import org.apache.activemq.artemis.tests.unit.core.postoffice.impl.FakeQueue;
-import org.apache.activemq.artemis.tests.util.ServiceTestBase;
 import org.apache.activemq.artemis.core.config.Configuration;
 import org.apache.activemq.artemis.core.filter.Filter;
 import org.apache.activemq.artemis.core.paging.cursor.PageCache;
@@ -47,14 +37,23 @@ import org.apache.activemq.artemis.core.server.impl.ServerMessageImpl;
 import org.apache.activemq.artemis.core.settings.impl.AddressSettings;
 import org.apache.activemq.artemis.core.transaction.Transaction;
 import org.apache.activemq.artemis.core.transaction.impl.TransactionImpl;
+import org.apache.activemq.artemis.tests.unit.core.postoffice.impl.FakeQueue;
+import org.apache.activemq.artemis.tests.util.ActiveMQTestBase;
 import org.apache.activemq.artemis.tests.util.RandomUtil;
 import org.apache.activemq.artemis.utils.LinkedListIterator;
-import org.junit.After;
 import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Test;
 
-public class PageCursorStressTest extends ServiceTestBase
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.concurrent.atomic.AtomicInteger;
+import java.util.concurrent.locks.ReentrantReadWriteLock;
+import java.util.concurrent.locks.ReentrantReadWriteLock.ReadLock;
+
+public class PageCursorStressTest extends ActiveMQTestBase
 {
 
    // Constants -----------------------------------------------------
@@ -857,15 +856,6 @@ public class PageCursorStressTest extends ServiceTestBase
    // Protected -----------------------------------------------------
 
    @Override
-   @After
-   public void tearDown() throws Exception
-   {
-      queue = null;
-      queueList = null;
-      super.tearDown();
-   }
-
-   @Override
    @Before
    public void setUp() throws Exception
    {
@@ -884,7 +874,7 @@ public class PageCursorStressTest extends ServiceTestBase
    {
       OperationContextImpl.clearContext();
 
-      Configuration config = createDefaultConfig()
+      Configuration config = createDefaultInVMConfig()
          .setJournalSyncNonTransactional(true);
 
       server = createServer(true, config, PAGE_SIZE, PAGE_MAX, new HashMap<String, AddressSettings>());

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/328611fd/tests/stress-tests/src/test/java/org/apache/activemq/artemis/tests/stress/paging/PageStressTest.java
----------------------------------------------------------------------
diff --git a/tests/stress-tests/src/test/java/org/apache/activemq/artemis/tests/stress/paging/PageStressTest.java b/tests/stress-tests/src/test/java/org/apache/activemq/artemis/tests/stress/paging/PageStressTest.java
index d954d65..7a8cd4f 100644
--- a/tests/stress-tests/src/test/java/org/apache/activemq/artemis/tests/stress/paging/PageStressTest.java
+++ b/tests/stress-tests/src/test/java/org/apache/activemq/artemis/tests/stress/paging/PageStressTest.java
@@ -30,7 +30,7 @@ import org.apache.activemq.artemis.core.config.Configuration;
 import org.apache.activemq.artemis.core.server.ActiveMQServer;
 import org.apache.activemq.artemis.core.settings.impl.AddressSettings;
 import org.apache.activemq.artemis.jms.client.ActiveMQBytesMessage;
-import org.apache.activemq.artemis.tests.util.ServiceTestBase;
+import org.apache.activemq.artemis.tests.util.ActiveMQTestBase;
 import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Test;
@@ -38,207 +38,177 @@ import org.junit.Test;
 /**
  * This is an integration-tests that will take some time to run.
  */
-public class PageStressTest extends ServiceTestBase
+public class PageStressTest extends ActiveMQTestBase
 {
-
-   // Constants -----------------------------------------------------
-
-   // Attributes ----------------------------------------------------
-
-   private ActiveMQServer messagingService;
+   private ActiveMQServer server;
 
    private ServerLocator locator;
 
    @Test
    public void testStopDuringDepage() throws Exception
    {
-      Configuration config = createDefaultConfig()
-         .setJournalSyncNonTransactional(false)
-         .setJournalSyncTransactional(false);
+      Configuration config = createDefaultInVMConfig()
+              .setJournalSyncNonTransactional(false)
+              .setJournalSyncTransactional(false);
 
       HashMap<String, AddressSettings> settings = new HashMap<String, AddressSettings>();
 
-      AddressSettings setting = new AddressSettings();
-      setting.setMaxSizeBytes(20 * 1024 * 1024);
+      AddressSettings setting = new AddressSettings().setMaxSizeBytes(20 * 1024 * 1024);
       settings.put("page-adr", setting);
 
-      messagingService = createServer(true, config, 10 * 1024 * 1024, 20 * 1024 * 1024, settings);
-      messagingService.start();
+      server = addServer(createServer(true, config, 10 * 1024 * 1024, 20 * 1024 * 1024, settings));
+      server.start();
 
+      final int NUMBER_OF_MESSAGES = 60000;
       ClientSessionFactory factory = createSessionFactory(locator);
-      ClientSession session = null;
-
-      try
-      {
-
-         final int NUMBER_OF_MESSAGES = 60000;
+      ClientSession session = addClientSession(factory.createSession(null, null, false, false, true, false, 1024 * NUMBER_OF_MESSAGES));
 
-         session = factory.createSession(null, null, false, false, true, false, 1024 * NUMBER_OF_MESSAGES);
+      SimpleString address = new SimpleString("page-adr");
 
-         SimpleString address = new SimpleString("page-adr");
+      session.createQueue(address, address, null, true);
 
-         session.createQueue(address, address, null, true);
+      ClientProducer prod = session.createProducer(address);
 
-         ClientProducer prod = session.createProducer(address);
+      ClientMessage message = createBytesMessage(session, ActiveMQBytesMessage.TYPE, new byte[700], true);
 
-         ClientMessage message = createBytesMessage(session, ActiveMQBytesMessage.TYPE, new byte[700], true);
-
-         for (int i = 0; i < NUMBER_OF_MESSAGES; i++)
+      for (int i = 0; i < NUMBER_OF_MESSAGES; i++)
+      {
+         if (i % 10000 == 0)
          {
-            if (i % 10000 == 0)
-            {
-               System.out.println("Sent " + i);
-            }
-            prod.send(message);
+            System.out.println("Sent " + i);
          }
+         prod.send(message);
+      }
 
-         session.commit();
+      session.commit();
 
-         session.start();
+      session.start();
 
-         ClientConsumer consumer = session.createConsumer(address);
+      ClientConsumer consumer = session.createConsumer(address);
 
-         int msgs = 0;
-         ClientMessage msg = null;
-         do
+      int msgs = 0;
+      ClientMessage msg;
+      do
+      {
+         msg = consumer.receive(10000);
+         if (msg != null)
          {
-            msg = consumer.receive(10000);
-            if (msg != null)
+            msg.acknowledge();
+            if (++msgs % 1000 == 0)
             {
-               msg.acknowledge();
-               if (++msgs % 1000 == 0)
-               {
-                  System.out.println("Received " + msgs);
-               }
+               System.out.println("Received " + msgs);
             }
          }
-         while (msg != null);
+      }
+      while (msg != null);
 
-         session.commit();
+      session.commit();
 
-         session.close();
+      session.close();
 
-         messagingService.stop();
+      server.stop();
 
-         System.out.println("server stopped, nr msgs: " + msgs);
+      System.out.println("server stopped, nr msgs: " + msgs);
 
-         messagingService = createServer(true, config, 10 * 1024 * 1024, 20 * 1024 * 1024, settings);
+      server = addServer(createServer(true, config, 10 * 1024 * 1024, 20 * 1024 * 1024, settings));
 
-         messagingService.start();
+      server.start();
 
-         factory = createSessionFactory(locator);
+      factory = createSessionFactory(locator);
 
-         session = factory.createSession(false, false, false);
+      session = addClientSession(factory.createSession(false, false, false));
 
-         consumer = session.createConsumer(address);
+      consumer = session.createConsumer(address);
 
-         session.start();
+      session.start();
 
-         msg = null;
-         do
+      do
+      {
+         msg = consumer.receive(10000);
+         if (msg != null)
          {
-            msg = consumer.receive(10000);
-            if (msg != null)
+            msg.acknowledge();
+            session.commit();
+            if (++msgs % 1000 == 0)
             {
-               msg.acknowledge();
-               session.commit();
-               if (++msgs % 1000 == 0)
-               {
-                  System.out.println("Received " + msgs);
-               }
+               System.out.println("Received " + msgs);
             }
          }
-         while (msg != null);
-
-         System.out.println("msgs second time: " + msgs);
-
-         Assert.assertEquals(NUMBER_OF_MESSAGES, msgs);
-      }
-      finally
-      {
-         session.close();
       }
+      while (msg != null);
+
+      System.out.println("msgs second time: " + msgs);
 
+      Assert.assertEquals(NUMBER_OF_MESSAGES, msgs);
    }
 
    @Test
    public void testPageOnMultipleDestinations() throws Exception
    {
-      Configuration config = createDefaultConfig();
-
-      HashMap<String, AddressSettings> settings = new HashMap<String, AddressSettings>();
+      HashMap<String, AddressSettings> settings = new HashMap<>();
 
-      AddressSettings setting = new AddressSettings();
-      setting.setMaxSizeBytes(20 * 1024 * 1024);
+      AddressSettings setting = new AddressSettings()
+              .setMaxSizeBytes(20 * 1024 * 1024);
       settings.put("page-adr", setting);
 
-      messagingService = createServer(true, config, 10 * 1024 * 1024, 20 * 1024 * 1024, settings);
-      messagingService.start();
+      server = addServer(createServer(true, createDefaultInVMConfig(), 10 * 1024 * 1024, 20 * 1024 * 1024, settings));
+      server.start();
 
       ClientSessionFactory factory = createSessionFactory(locator);
       ClientSession session = null;
 
-      try
-      {
-         session = factory.createSession(false, false, false);
+      session = factory.createSession(false, false, false);
 
-         SimpleString address = new SimpleString("page-adr");
-         SimpleString[] queue = new SimpleString[]{new SimpleString("queue1"), new SimpleString("queue2")};
+      SimpleString address = new SimpleString("page-adr");
+      SimpleString[] queue = new SimpleString[]{new SimpleString("queue1"), new SimpleString("queue2")};
 
-         session.createQueue(address, queue[0], null, true);
-         session.createQueue(address, queue[1], null, true);
+      session.createQueue(address, queue[0], null, true);
+      session.createQueue(address, queue[1], null, true);
 
-         ClientProducer prod = session.createProducer(address);
+      ClientProducer prod = session.createProducer(address);
 
-         ClientMessage message = createBytesMessage(session, ActiveMQBytesMessage.TYPE, new byte[700], false);
+      ClientMessage message = createBytesMessage(session, ActiveMQBytesMessage.TYPE, new byte[700], false);
 
-         int NUMBER_OF_MESSAGES = 60000;
+      int NUMBER_OF_MESSAGES = 60000;
 
-         for (int i = 0; i < NUMBER_OF_MESSAGES; i++)
+      for (int i = 0; i < NUMBER_OF_MESSAGES; i++)
+      {
+         if (i % 10000 == 0)
          {
-            if (i % 10000 == 0)
-            {
-               System.out.println(i);
-            }
-            prod.send(message);
+            System.out.println(i);
          }
+         prod.send(message);
+      }
 
-         session.commit();
+      session.commit();
 
-         session.start();
+      session.start();
 
-         int[] counters = new int[2];
+      int[] counters = new int[2];
 
-         ClientConsumer[] consumers = new ClientConsumer[]{session.createConsumer(queue[0]),
-            session.createConsumer(queue[1])};
+      ClientConsumer[] consumers = new ClientConsumer[]{session.createConsumer(queue[0]),
+              session.createConsumer(queue[1])};
 
-         while (true)
-         {
-            int msgs1 = readMessages(session, consumers[0], queue[0]);
-            int msgs2 = readMessages(session, consumers[1], queue[1]);
-            counters[0] += msgs1;
-            counters[1] += msgs2;
+      while (true)
+      {
+         int msgs1 = readMessages(session, consumers[0], queue[0]);
+         int msgs2 = readMessages(session, consumers[1], queue[1]);
+         counters[0] += msgs1;
+         counters[1] += msgs2;
 
-            System.out.println("msgs1 = " + msgs1 + " msgs2 = " + msgs2);
+         System.out.println("msgs1 = " + msgs1 + " msgs2 = " + msgs2);
 
-            if (msgs1 + msgs2 == 0)
-            {
-               break;
-            }
+         if (msgs1 + msgs2 == 0)
+         {
+            break;
          }
-
-         consumers[0].close();
-         consumers[1].close();
-
-         Assert.assertEquals(NUMBER_OF_MESSAGES, counters[0]);
-         Assert.assertEquals(NUMBER_OF_MESSAGES, counters[1]);
-      }
-      finally
-      {
-         session.close();
-         messagingService.stop();
       }
 
+      consumers[0].close();
+      consumers[1].close();
+
+      Assert.assertEquals(NUMBER_OF_MESSAGES, counters[0]);
+      Assert.assertEquals(NUMBER_OF_MESSAGES, counters[1]);
    }
 
    private int readMessages(final ClientSession session, final ClientConsumer consumer, final SimpleString queue) throws ActiveMQException
@@ -272,9 +242,9 @@ public class PageStressTest extends ServiceTestBase
 
    // Protected -----------------------------------------------------
    @Override
-   protected Configuration createDefaultConfig() throws Exception
+   protected Configuration createDefaultInVMConfig() throws Exception
    {
-      Configuration config = super.createDefaultConfig()
+      Configuration config = super.createDefaultInVMConfig()
          .setJournalFileSize(10 * 1024 * 1024)
          .setJournalMinFiles(5);
 
@@ -286,11 +256,9 @@ public class PageStressTest extends ServiceTestBase
    public void setUp() throws Exception
    {
       super.setUp();
-      locator = createInVMNonHALocator();
-
-      locator.setBlockOnAcknowledge(true);
-      locator.setBlockOnDurableSend(false);
-      locator.setBlockOnNonDurableSend(false);
-
+      locator = createInVMNonHALocator()
+              .setBlockOnAcknowledge(true)
+              .setBlockOnDurableSend(false)
+              .setBlockOnNonDurableSend(false);
    }
 }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/328611fd/tests/stress-tests/src/test/java/org/apache/activemq/artemis/tests/stress/remote/PingStressTest.java
----------------------------------------------------------------------
diff --git a/tests/stress-tests/src/test/java/org/apache/activemq/artemis/tests/stress/remote/PingStressTest.java b/tests/stress-tests/src/test/java/org/apache/activemq/artemis/tests/stress/remote/PingStressTest.java
index 4596e8d..a82b811 100644
--- a/tests/stress-tests/src/test/java/org/apache/activemq/artemis/tests/stress/remote/PingStressTest.java
+++ b/tests/stress-tests/src/test/java/org/apache/activemq/artemis/tests/stress/remote/PingStressTest.java
@@ -15,30 +15,26 @@
  * limitations under the License.
  */
 package org.apache.activemq.artemis.tests.stress.remote;
-import org.apache.activemq.artemis.api.core.ActiveMQException;
-import org.junit.Before;
-
-import org.junit.Test;
-
-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.Interceptor;
-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.core.config.Configuration;
 import org.apache.activemq.artemis.core.protocol.core.Packet;
 import org.apache.activemq.artemis.core.protocol.core.impl.PacketImpl;
 import org.apache.activemq.artemis.core.server.ActiveMQServer;
 import org.apache.activemq.artemis.spi.core.protocol.RemotingConnection;
 import org.apache.activemq.artemis.tests.unit.UnitTestLogger;
+import org.apache.activemq.artemis.tests.util.ActiveMQTestBase;
 import org.apache.activemq.artemis.tests.util.RandomUtil;
-import org.apache.activemq.artemis.tests.util.ServiceTestBase;
+import org.junit.Before;
+import org.junit.Test;
 
-public class PingStressTest extends ServiceTestBase
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.TimeUnit;
+
+public class PingStressTest extends ActiveMQTestBase
 {
    private static final UnitTestLogger log = UnitTestLogger.LOGGER;
 
@@ -51,8 +47,7 @@ public class PingStressTest extends ServiceTestBase
    public void setUp() throws Exception
    {
       super.setUp();
-      Configuration config = createDefaultConfig(true);
-      server = createServer(false, config);
+      server = createServer(false, createDefaultNettyConfig());
       server.start();
    }
 
@@ -81,8 +76,6 @@ public class PingStressTest extends ServiceTestBase
     */
    private void internalTest() throws Exception
    {
-      final TransportConfiguration transportConfig = new TransportConfiguration("org.apache.activemq.artemis.core.remoting.impl.netty.NettyConnectorFactory");
-
       Interceptor noPongInterceptor = new Interceptor()
       {
          public boolean intercept(final Packet packet, final RemotingConnection conn) throws ActiveMQException
@@ -101,10 +94,10 @@ public class PingStressTest extends ServiceTestBase
       };
 
       server.getRemotingService().addIncomingInterceptor(noPongInterceptor);
-      ServerLocator locator = addServerLocator(ActiveMQClient.createServerLocatorWithoutHA(transportConfig));
-      locator.setClientFailureCheckPeriod(PingStressTest.PING_INTERVAL);
-      locator.setConnectionTTL((long)(PingStressTest.PING_INTERVAL * 1.5));
-      locator.setCallTimeout(PingStressTest.PING_INTERVAL * 10);
+      ServerLocator locator = createNettyNonHALocator()
+              .setClientFailureCheckPeriod(PingStressTest.PING_INTERVAL)
+              .setConnectionTTL((long) (PingStressTest.PING_INTERVAL * 1.5))
+              .setCallTimeout(PingStressTest.PING_INTERVAL * 10);
       final ClientSessionFactory csf1 = createSessionFactory(locator);
 
 
@@ -132,10 +125,10 @@ public class PingStressTest extends ServiceTestBase
             try
             {
 
-               ServerLocator locator = addServerLocator(ActiveMQClient.createServerLocatorWithoutHA(transportConfig));
-               locator.setClientFailureCheckPeriod(PingStressTest.PING_INTERVAL);
-               locator.setConnectionTTL((long)(PingStressTest.PING_INTERVAL * 1.5));
-               locator.setCallTimeout(PingStressTest.PING_INTERVAL * 10);
+               ServerLocator locator = createNettyNonHALocator()
+                       .setClientFailureCheckPeriod(PingStressTest.PING_INTERVAL)
+                       .setConnectionTTL((long) (PingStressTest.PING_INTERVAL * 1.5))
+                       .setCallTimeout(PingStressTest.PING_INTERVAL * 10);
 
                final ClientSessionFactory csf2 = createSessionFactory(locator);
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/328611fd/tests/stress-tests/src/test/java/org/apache/activemq/artemis/tests/stress/stomp/StompStressTest.java
----------------------------------------------------------------------
diff --git a/tests/stress-tests/src/test/java/org/apache/activemq/artemis/tests/stress/stomp/StompStressTest.java b/tests/stress-tests/src/test/java/org/apache/activemq/artemis/tests/stress/stomp/StompStressTest.java
index e9d4404..15116ed 100644
--- a/tests/stress-tests/src/test/java/org/apache/activemq/artemis/tests/stress/stomp/StompStressTest.java
+++ b/tests/stress-tests/src/test/java/org/apache/activemq/artemis/tests/stress/stomp/StompStressTest.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 package org.apache.activemq.artemis.tests.stress.stomp;
-import org.apache.activemq.artemis.tests.util.ServiceTestBase;
+import org.apache.activemq.artemis.tests.util.ActiveMQTestBase;
 import org.junit.Before;
 import org.junit.After;
 
@@ -43,7 +43,7 @@ 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;
 
-public class StompStressTest extends ServiceTestBase
+public class StompStressTest extends ActiveMQTestBase
 {
    private static final int COUNT = 1000;
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/328611fd/tests/timing-tests/src/test/java/org/apache/activemq/artemis/tests/timing/core/journal/impl/AIOJournalImplTest.java
----------------------------------------------------------------------
diff --git a/tests/timing-tests/src/test/java/org/apache/activemq/artemis/tests/timing/core/journal/impl/AIOJournalImplTest.java b/tests/timing-tests/src/test/java/org/apache/activemq/artemis/tests/timing/core/journal/impl/AIOJournalImplTest.java
index 972828d..e581ed6 100644
--- a/tests/timing-tests/src/test/java/org/apache/activemq/artemis/tests/timing/core/journal/impl/AIOJournalImplTest.java
+++ b/tests/timing-tests/src/test/java/org/apache/activemq/artemis/tests/timing/core/journal/impl/AIOJournalImplTest.java
@@ -17,7 +17,7 @@
 package org.apache.activemq.artemis.tests.timing.core.journal.impl;
 import java.io.File;
 
-import org.apache.activemq.artemis.tests.util.ServiceTestBase;
+import org.apache.activemq.artemis.tests.util.ActiveMQTestBase;
 import org.apache.activemq.artemis.core.journal.SequentialFileFactory;
 import org.apache.activemq.artemis.core.journal.impl.AIOSequentialFileFactory;
 import org.junit.BeforeClass;
@@ -35,7 +35,7 @@ public class AIOJournalImplTest extends JournalImplTestUnit
    {
       File file = new File(getTestDir());
 
-      ServiceTestBase.deleteDirectory(file);
+      ActiveMQTestBase.deleteDirectory(file);
 
       file.mkdir();
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/328611fd/tests/timing-tests/src/test/java/org/apache/activemq/artemis/tests/timing/core/journal/impl/NIOJournalImplTest.java
----------------------------------------------------------------------
diff --git a/tests/timing-tests/src/test/java/org/apache/activemq/artemis/tests/timing/core/journal/impl/NIOJournalImplTest.java b/tests/timing-tests/src/test/java/org/apache/activemq/artemis/tests/timing/core/journal/impl/NIOJournalImplTest.java
index c4654df..51329a4 100644
--- a/tests/timing-tests/src/test/java/org/apache/activemq/artemis/tests/timing/core/journal/impl/NIOJournalImplTest.java
+++ b/tests/timing-tests/src/test/java/org/apache/activemq/artemis/tests/timing/core/journal/impl/NIOJournalImplTest.java
@@ -18,7 +18,7 @@ package org.apache.activemq.artemis.tests.timing.core.journal.impl;
 
 import java.io.File;
 
-import org.apache.activemq.artemis.tests.util.ServiceTestBase;
+import org.apache.activemq.artemis.tests.util.ActiveMQTestBase;
 import org.apache.activemq.artemis.core.journal.SequentialFileFactory;
 import org.apache.activemq.artemis.core.journal.impl.NIOSequentialFileFactory;
 import org.apache.activemq.artemis.tests.unit.UnitTestLogger;
@@ -36,7 +36,7 @@ public class NIOJournalImplTest extends JournalImplTestUnit
 
       NIOJournalImplTest.log.debug("deleting directory " + journalDir);
 
-      ServiceTestBase.deleteDirectory(file);
+      ActiveMQTestBase.deleteDirectory(file);
 
       file.mkdir();
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/328611fd/tests/timing-tests/src/test/java/org/apache/activemq/artemis/tests/timing/core/server/impl/QueueConcurrentTest.java
----------------------------------------------------------------------
diff --git a/tests/timing-tests/src/test/java/org/apache/activemq/artemis/tests/timing/core/server/impl/QueueConcurrentTest.java b/tests/timing-tests/src/test/java/org/apache/activemq/artemis/tests/timing/core/server/impl/QueueConcurrentTest.java
index 1bdbb33..777a122 100644
--- a/tests/timing-tests/src/test/java/org/apache/activemq/artemis/tests/timing/core/server/impl/QueueConcurrentTest.java
+++ b/tests/timing-tests/src/test/java/org/apache/activemq/artemis/tests/timing/core/server/impl/QueueConcurrentTest.java
@@ -16,7 +16,7 @@
  */
 package org.apache.activemq.artemis.tests.timing.core.server.impl;
 import org.apache.activemq.artemis.tests.unit.core.server.impl.fakes.FakeQueueFactory;
-import org.apache.activemq.artemis.tests.util.ServiceTestBase;
+import org.apache.activemq.artemis.tests.util.ActiveMQTestBase;
 import org.junit.Before;
 import org.junit.After;
 
@@ -40,7 +40,7 @@ import org.apache.activemq.artemis.tests.unit.core.server.impl.fakes.FakeConsume
  *
  * All the concurrent queue tests go in here
  */
-public class QueueConcurrentTest extends ServiceTestBase
+public class QueueConcurrentTest extends ActiveMQTestBase
 {
    private static final UnitTestLogger log = UnitTestLogger.LOGGER;
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/328611fd/tests/timing-tests/src/test/java/org/apache/activemq/artemis/tests/timing/core/server/impl/QueueImplTest.java
----------------------------------------------------------------------
diff --git a/tests/timing-tests/src/test/java/org/apache/activemq/artemis/tests/timing/core/server/impl/QueueImplTest.java b/tests/timing-tests/src/test/java/org/apache/activemq/artemis/tests/timing/core/server/impl/QueueImplTest.java
index 96d1f62..b660be4 100644
--- a/tests/timing-tests/src/test/java/org/apache/activemq/artemis/tests/timing/core/server/impl/QueueImplTest.java
+++ b/tests/timing-tests/src/test/java/org/apache/activemq/artemis/tests/timing/core/server/impl/QueueImplTest.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 package org.apache.activemq.artemis.tests.timing.core.server.impl;
-import org.apache.activemq.artemis.tests.util.ServiceTestBase;
+import org.apache.activemq.artemis.tests.util.ActiveMQTestBase;
 import org.junit.Before;
 import org.junit.After;
 
@@ -38,7 +38,7 @@ import org.apache.activemq.artemis.core.server.MessageReference;
 import org.apache.activemq.artemis.core.server.impl.QueueImpl;
 import org.apache.activemq.artemis.tests.unit.core.server.impl.fakes.FakeConsumer;
 
-public class QueueImplTest extends ServiceTestBase
+public class QueueImplTest extends ActiveMQTestBase
 {
    private static final SimpleString queue1 = new SimpleString("queue1");
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/328611fd/tests/timing-tests/src/test/java/org/apache/activemq/artemis/tests/timing/jms/bridge/impl/JMSBridgeImplTest.java
----------------------------------------------------------------------
diff --git a/tests/timing-tests/src/test/java/org/apache/activemq/artemis/tests/timing/jms/bridge/impl/JMSBridgeImplTest.java b/tests/timing-tests/src/test/java/org/apache/activemq/artemis/tests/timing/jms/bridge/impl/JMSBridgeImplTest.java
index a7c7440..248d265 100644
--- a/tests/timing-tests/src/test/java/org/apache/activemq/artemis/tests/timing/jms/bridge/impl/JMSBridgeImplTest.java
+++ b/tests/timing-tests/src/test/java/org/apache/activemq/artemis/tests/timing/jms/bridge/impl/JMSBridgeImplTest.java
@@ -16,6 +16,33 @@
  */
 package org.apache.activemq.artemis.tests.timing.jms.bridge.impl;
 
+import org.apache.activemq.artemis.api.core.TransportConfiguration;
+import org.apache.activemq.artemis.api.core.management.ObjectNameBuilder;
+import org.apache.activemq.artemis.api.jms.ActiveMQJMSClient;
+import org.apache.activemq.artemis.api.jms.JMSFactoryType;
+import org.apache.activemq.artemis.api.jms.management.JMSQueueControl;
+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;
+import org.apache.activemq.artemis.core.remoting.impl.invm.InVMConnectorFactory;
+import org.apache.activemq.artemis.core.server.ActiveMQServers;
+import org.apache.activemq.artemis.jms.bridge.ConnectionFactoryFactory;
+import org.apache.activemq.artemis.jms.bridge.DestinationFactory;
+import org.apache.activemq.artemis.jms.bridge.QualityOfServiceMode;
+import org.apache.activemq.artemis.jms.bridge.impl.JMSBridgeImpl;
+import org.apache.activemq.artemis.jms.client.ActiveMQJMSConnectionFactory;
+import org.apache.activemq.artemis.jms.server.JMSServerManager;
+import org.apache.activemq.artemis.jms.server.impl.JMSServerManagerImpl;
+import org.apache.activemq.artemis.tests.unit.UnitTestLogger;
+import org.apache.activemq.artemis.tests.unit.util.InVMNamingContext;
+import org.apache.activemq.artemis.tests.util.ActiveMQTestBase;
+import org.apache.activemq.artemis.tests.util.RandomUtil;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.rules.ExpectedException;
+
 import javax.jms.Connection;
 import javax.jms.ConnectionFactory;
 import javax.jms.Destination;
@@ -43,35 +70,7 @@ import java.util.concurrent.CountDownLatch;
 import java.util.concurrent.TimeUnit;
 import java.util.concurrent.atomic.AtomicReference;
 
-import org.apache.activemq.artemis.api.core.TransportConfiguration;
-import org.apache.activemq.artemis.api.core.management.ObjectNameBuilder;
-import org.apache.activemq.artemis.api.jms.ActiveMQJMSClient;
-import org.apache.activemq.artemis.api.jms.JMSFactoryType;
-import org.apache.activemq.artemis.api.jms.management.JMSQueueControl;
-import org.apache.activemq.artemis.tests.unit.UnitTestLogger;
-import org.apache.activemq.artemis.tests.unit.util.InVMNamingContext;
-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;
-import org.apache.activemq.artemis.core.remoting.impl.invm.InVMConnectorFactory;
-import org.apache.activemq.artemis.core.server.ActiveMQServers;
-import org.apache.activemq.artemis.jms.bridge.ConnectionFactoryFactory;
-import org.apache.activemq.artemis.jms.bridge.DestinationFactory;
-import org.apache.activemq.artemis.jms.bridge.QualityOfServiceMode;
-import org.apache.activemq.artemis.jms.bridge.impl.JMSBridgeImpl;
-import org.apache.activemq.artemis.jms.client.ActiveMQJMSConnectionFactory;
-import org.apache.activemq.artemis.jms.server.JMSServerManager;
-import org.apache.activemq.artemis.jms.server.impl.JMSServerManagerImpl;
-import org.apache.activemq.artemis.tests.util.RandomUtil;
-import org.junit.After;
-import org.junit.Assert;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.rules.ExpectedException;
-
-public class JMSBridgeImplTest extends ServiceTestBase
+public class JMSBridgeImplTest extends ActiveMQTestBase
 {
    // Constants -----------------------------------------------------
 
@@ -618,7 +617,7 @@ public class JMSBridgeImplTest extends ServiceTestBase
       Configuration config = createBasicConfig()
          .addAcceptorConfiguration(new TransportConfiguration(InVMAcceptorFactory.class.getName()));
       InVMNamingContext context = new InVMNamingContext();
-      jmsServer = new JMSServerManagerImpl(ActiveMQServers.newActiveMQServer(config, false));
+      jmsServer = new JMSServerManagerImpl(addServer(ActiveMQServers.newActiveMQServer(config, false)));
       jmsServer.setRegistry(new JndiBindingRegistry(context));
       jmsServer.start();
 
@@ -627,15 +626,6 @@ public class JMSBridgeImplTest extends ServiceTestBase
 
    }
 
-   @Override
-   @After
-   public void tearDown() throws Exception
-   {
-      jmsServer.stop();
-
-      super.tearDown();
-   }
-
    @Test
    public void testTransactionManagerNotSetForDuplicatesOK() throws Exception
    {

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/328611fd/tests/timing-tests/src/test/java/org/apache/activemq/artemis/tests/timing/util/ReusableLatchTest.java
----------------------------------------------------------------------
diff --git a/tests/timing-tests/src/test/java/org/apache/activemq/artemis/tests/timing/util/ReusableLatchTest.java b/tests/timing-tests/src/test/java/org/apache/activemq/artemis/tests/timing/util/ReusableLatchTest.java
index 47ea01f..265a5dc 100644
--- a/tests/timing-tests/src/test/java/org/apache/activemq/artemis/tests/timing/util/ReusableLatchTest.java
+++ b/tests/timing-tests/src/test/java/org/apache/activemq/artemis/tests/timing/util/ReusableLatchTest.java
@@ -16,14 +16,14 @@
  */
 package org.apache.activemq.artemis.tests.timing.util;
 
-import org.apache.activemq.artemis.tests.util.ServiceTestBase;
+import org.apache.activemq.artemis.tests.util.ActiveMQTestBase;
 import org.junit.Test;
 
 import org.junit.Assert;
 
 import org.apache.activemq.artemis.utils.ReusableLatch;
 
-public class ReusableLatchTest extends ServiceTestBase
+public class ReusableLatchTest extends ActiveMQTestBase
 {
    @Test
    public void testTimeout() throws Exception

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/328611fd/tests/timing-tests/src/test/java/org/apache/activemq/artemis/tests/timing/util/TokenBucketLimiterImplTest.java
----------------------------------------------------------------------
diff --git a/tests/timing-tests/src/test/java/org/apache/activemq/artemis/tests/timing/util/TokenBucketLimiterImplTest.java b/tests/timing-tests/src/test/java/org/apache/activemq/artemis/tests/timing/util/TokenBucketLimiterImplTest.java
index eabc9fb..99f282d 100644
--- a/tests/timing-tests/src/test/java/org/apache/activemq/artemis/tests/timing/util/TokenBucketLimiterImplTest.java
+++ b/tests/timing-tests/src/test/java/org/apache/activemq/artemis/tests/timing/util/TokenBucketLimiterImplTest.java
@@ -21,12 +21,12 @@ import java.util.concurrent.atomic.AtomicBoolean;
 import java.util.concurrent.atomic.AtomicInteger;
 
 import org.apache.activemq.artemis.tests.unit.UnitTestLogger;
-import org.apache.activemq.artemis.tests.util.ServiceTestBase;
+import org.apache.activemq.artemis.tests.util.ActiveMQTestBase;
 import org.apache.activemq.artemis.utils.TokenBucketLimiterImpl;
 import org.junit.Assert;
 import org.junit.Test;
 
-public class TokenBucketLimiterImplTest extends ServiceTestBase
+public class TokenBucketLimiterImplTest extends ActiveMQTestBase
 {
    private static final UnitTestLogger log = UnitTestLogger.LOGGER;
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/328611fd/tests/timing-tests/src/test/java/org/apache/activemq/artemis/tests/timing/util/UTF8Test.java
----------------------------------------------------------------------
diff --git a/tests/timing-tests/src/test/java/org/apache/activemq/artemis/tests/timing/util/UTF8Test.java b/tests/timing-tests/src/test/java/org/apache/activemq/artemis/tests/timing/util/UTF8Test.java
index a864a2e..479aa74 100644
--- a/tests/timing-tests/src/test/java/org/apache/activemq/artemis/tests/timing/util/UTF8Test.java
+++ b/tests/timing-tests/src/test/java/org/apache/activemq/artemis/tests/timing/util/UTF8Test.java
@@ -23,10 +23,10 @@ import org.junit.Test;
 
 import org.junit.Assert;
 
-import org.apache.activemq.artemis.tests.util.ServiceTestBase;
+import org.apache.activemq.artemis.tests.util.ActiveMQTestBase;
 import org.apache.activemq.artemis.utils.UTF8Util;
 
-public class UTF8Test extends ServiceTestBase
+public class UTF8Test extends ActiveMQTestBase
 {
 
    private final String str = "abcdef&^*&!^ghijkl\uB5E2\uCAC7\uB2BB\uB7DD\uB7C7\uB3A3\uBCE4\uB5A5" + "abcdef&^*&!^ghijkl\uB5E2\uCAC7\uB2BB\uB7DD\uB7C7\uB3A3\uBCE4\uB5A5"

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/328611fd/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/asyncio/AIOTestBase.java
----------------------------------------------------------------------
diff --git a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/asyncio/AIOTestBase.java b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/asyncio/AIOTestBase.java
index ae88e0f..e89ee23 100644
--- a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/asyncio/AIOTestBase.java
+++ b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/asyncio/AIOTestBase.java
@@ -22,7 +22,7 @@ import java.util.concurrent.CountDownLatch;
 import java.util.concurrent.atomic.AtomicInteger;
 
 import org.apache.activemq.artemis.api.core.ActiveMQException;
-import org.apache.activemq.artemis.tests.util.ServiceTestBase;
+import org.apache.activemq.artemis.tests.util.ActiveMQTestBase;
 import org.apache.activemq.artemis.core.asyncio.AIOCallback;
 import org.apache.activemq.artemis.core.asyncio.impl.AsynchronousFileImpl;
 import org.junit.After;
@@ -32,7 +32,7 @@ import org.junit.Before;
 /**
  * The base class for AIO Tests
  */
-public abstract class AIOTestBase extends ServiceTestBase
+public abstract class AIOTestBase extends ActiveMQTestBase
 {
    // The AIO Test must use a local filesystem. Sometimes $HOME is on a NFS on
    // most enterprise systems

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/328611fd/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/asyncio/AsynchronousFileTest.java
----------------------------------------------------------------------
diff --git a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/asyncio/AsynchronousFileTest.java b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/asyncio/AsynchronousFileTest.java
index 55471a9..d16e8b5 100644
--- a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/asyncio/AsynchronousFileTest.java
+++ b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/asyncio/AsynchronousFileTest.java
@@ -39,7 +39,7 @@ import org.apache.activemq.artemis.core.asyncio.BufferCallback;
 import org.apache.activemq.artemis.core.asyncio.impl.AsynchronousFileImpl;
 import org.apache.activemq.artemis.core.journal.impl.AIOSequentialFileFactory;
 import org.apache.activemq.artemis.tests.unit.UnitTestLogger;
-import org.apache.activemq.artemis.tests.util.ServiceTestBase;
+import org.apache.activemq.artemis.tests.util.ActiveMQTestBase;
 import org.apache.activemq.artemis.utils.ActiveMQThreadFactory;
 import org.junit.After;
 import org.junit.Assert;
@@ -151,7 +151,7 @@ public class AsynchronousFileTest extends AIOTestBase
 
       for (int i = 0; i < 1024; i++)
       {
-         write.put(ServiceTestBase.getSamplebyte(i));
+         write.put(ActiveMQTestBase.getSamplebyte(i));
       }
 
       final CountDownLatch latch = new CountDownLatch(1);
@@ -177,7 +177,7 @@ public class AsynchronousFileTest extends AIOTestBase
 
       write = null;
 
-      ServiceTestBase.forceGC(bufferCheck2, 5000);
+      ActiveMQTestBase.forceGC(bufferCheck2, 5000);
 
       assertNull(bufferCheck2.get());
 
@@ -185,7 +185,7 @@ public class AsynchronousFileTest extends AIOTestBase
 
       controller = null;
 
-      ServiceTestBase.forceGC(bufferCheck, 5000);
+      ActiveMQTestBase.forceGC(bufferCheck, 5000);
 
       assertNull(bufferCheck.get());
    }
@@ -272,8 +272,8 @@ public class AsynchronousFileTest extends AIOTestBase
 
          }
 
-         ServiceTestBase.waitForLatch(latchDone);
-         ServiceTestBase.waitForLatch(latchDone2);
+         ActiveMQTestBase.waitForLatch(latchDone);
+         ActiveMQTestBase.waitForLatch(latchDone2);
 
          CountDownCallback.checkResults(numberOfLines, listResult1);
          CountDownCallback.checkResults(numberOfLines, listResult2);
@@ -626,7 +626,7 @@ public class AsynchronousFileTest extends AIOTestBase
             final ByteBuffer buffer0 = AsynchronousFileImpl.newBuffer(SIZE);
             for (int j = 0; j < SIZE; j++)
             {
-               buffer0.put(ServiceTestBase.getSamplebyte(j));
+               buffer0.put(ActiveMQTestBase.getSamplebyte(j));
             }
 
             CountDownCallback aio = new CountDownCallback(latch, errors, result, i);
@@ -673,7 +673,7 @@ public class AsynchronousFileTest extends AIOTestBase
          for (int count = 0; count < SIZE; count++)
          {
             Assert.assertEquals("byte position " + count + " differs on line " + i + " position = " + count,
-                                ServiceTestBase.getSamplebyte(count),
+                                ActiveMQTestBase.getSamplebyte(count),
                                 bytesRead[count]);
          }
       }
@@ -803,7 +803,7 @@ public class AsynchronousFileTest extends AIOTestBase
 
       }
 
-      ServiceTestBase.waitForLatch(latchDone);
+      ActiveMQTestBase.waitForLatch(latchDone);
 
       long timeTotal = System.currentTimeMillis() - valueInitial;
 
@@ -853,7 +853,7 @@ public class AsynchronousFileTest extends AIOTestBase
          CountDownLatch latchDone = new CountDownLatch(1);
          CountDownCallback aioBlock = new CountDownCallback(latchDone, null, null, 0);
          controller.write(i * 512, 512, buffer, aioBlock);
-         ServiceTestBase.waitForLatch(latchDone);
+         ActiveMQTestBase.waitForLatch(latchDone);
          assertTrue(aioBlock.doneCalled);
          assertEquals(0, aioBlock.errorCalled);
       }
@@ -922,7 +922,7 @@ public class AsynchronousFileTest extends AIOTestBase
       CountDownCallback aioBlock = new CountDownCallback(latchDone, null, null, 0);
       controller.write(11, 512, buffer, aioBlock);
 
-      ServiceTestBase.waitForLatch(latchDone);
+      ActiveMQTestBase.waitForLatch(latchDone);
 
       assertTrue(aioBlock.errorCalled != 0);
       assertFalse(aioBlock.doneCalled);

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/328611fd/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/asyncio/MultiThreadAsynchronousFileTest.java
----------------------------------------------------------------------
diff --git a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/asyncio/MultiThreadAsynchronousFileTest.java b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/asyncio/MultiThreadAsynchronousFileTest.java
index be37b83..20cb6b4 100644
--- a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/asyncio/MultiThreadAsynchronousFileTest.java
+++ b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/asyncio/MultiThreadAsynchronousFileTest.java
@@ -16,26 +16,26 @@
  */
 package org.apache.activemq.artemis.tests.unit.core.asyncio;
 
-import java.nio.ByteBuffer;
-import java.util.ArrayList;
-import java.util.LinkedList;
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Executors;
-import java.util.concurrent.atomic.AtomicInteger;
-
 import org.apache.activemq.artemis.api.core.ActiveMQExceptionType;
-import org.apache.activemq.artemis.tests.util.ServiceTestBase;
 import org.apache.activemq.artemis.core.asyncio.AIOCallback;
 import org.apache.activemq.artemis.core.asyncio.impl.AsynchronousFileImpl;
 import org.apache.activemq.artemis.core.journal.impl.AIOSequentialFileFactory;
 import org.apache.activemq.artemis.tests.unit.UnitTestLogger;
+import org.apache.activemq.artemis.tests.util.ActiveMQTestBase;
 import org.apache.activemq.artemis.utils.ActiveMQThreadFactory;
 import org.junit.After;
 import org.junit.Before;
 import org.junit.BeforeClass;
 import org.junit.Test;
 
+import java.nio.ByteBuffer;
+import java.util.ArrayList;
+import java.util.LinkedList;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+import java.util.concurrent.atomic.AtomicInteger;
+
 /**
  * you need to define -Djava.library.path=${project-root}/native/src/.libs when calling the JVM
  * If you are running this test in eclipse you should do:
@@ -125,7 +125,7 @@ public class MultiThreadAsynchronousFileTest extends AIOTestBase
          }
 
          latchStart.countDown();
-         ServiceTestBase.waitForLatch(latchStart);
+         ActiveMQTestBase.waitForLatch(latchStart);
 
          long startTime = System.currentTimeMillis();
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/328611fd/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/client/impl/LargeMessageBufferTest.java
----------------------------------------------------------------------
diff --git a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/client/impl/LargeMessageBufferTest.java b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/client/impl/LargeMessageBufferTest.java
index 4aa7391..15bab48 100644
--- a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/client/impl/LargeMessageBufferTest.java
+++ b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/client/impl/LargeMessageBufferTest.java
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License. You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -16,19 +16,6 @@
  */
 package org.apache.activemq.artemis.tests.unit.core.client.impl;
 
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.File;
-import java.io.IOException;
-import java.io.OutputStream;
-import java.io.PipedInputStream;
-import java.io.PipedOutputStream;
-import java.util.concurrent.CountDownLatch;
-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.ActiveMQBuffers;
 import org.apache.activemq.artemis.api.core.ActiveMQException;
@@ -36,7 +23,6 @@ import org.apache.activemq.artemis.api.core.SimpleString;
 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.MessageHandler;
-import org.apache.activemq.artemis.tests.util.ServiceTestBase;
 import org.apache.activemq.artemis.core.client.impl.ClientConsumerInternal;
 import org.apache.activemq.artemis.core.client.impl.ClientLargeMessageInternal;
 import org.apache.activemq.artemis.core.client.impl.ClientMessageInternal;
@@ -44,15 +30,28 @@ import org.apache.activemq.artemis.core.client.impl.ClientSessionInternal;
 import org.apache.activemq.artemis.core.client.impl.LargeMessageControllerImpl;
 import org.apache.activemq.artemis.core.protocol.core.impl.ActiveMQConsumerContext;
 import org.apache.activemq.artemis.spi.core.remoting.ConsumerContext;
+import org.apache.activemq.artemis.tests.util.ActiveMQTestBase;
 import org.apache.activemq.artemis.tests.util.RandomUtil;
-import org.apache.activemq.artemis.utils.FutureLatch;
 import org.apache.activemq.artemis.utils.ActiveMQBufferInputStream;
-import org.junit.After;
+import org.apache.activemq.artemis.utils.FutureLatch;
 import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Test;
 
-public class LargeMessageBufferTest extends ServiceTestBase
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.DataInputStream;
+import java.io.DataOutputStream;
+import java.io.File;
+import java.io.IOException;
+import java.io.OutputStream;
+import java.io.PipedInputStream;
+import java.io.PipedOutputStream;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.atomic.AtomicInteger;
+
+public class LargeMessageBufferTest extends ActiveMQTestBase
 {
 
    // Constants -----------------------------------------------------
@@ -79,13 +78,6 @@ public class LargeMessageBufferTest extends ServiceTestBase
       tmp.mkdirs();
    }
 
-   @Override
-   @After
-   public void tearDown() throws Exception
-   {
-      super.tearDown();
-   }
-
    // Test Simple getBytes
    @Test
    public void testGetBytes() throws Exception
@@ -340,7 +332,7 @@ public class LargeMessageBufferTest extends ServiceTestBase
 
       t.start();
 
-      ServiceTestBase.waitForLatch(latchGo);
+      ActiveMQTestBase.waitForLatch(latchGo);
 
       buffer.cancel();
 
@@ -632,7 +624,7 @@ public class LargeMessageBufferTest extends ServiceTestBase
          }
       });
 
-      ServiceTestBase.waitForLatch(latchBytesWritten1);
+      ActiveMQTestBase.waitForLatch(latchBytesWritten1);
 
       try
       {

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/328611fd/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/config/impl/ConfigurationValidationTest.java
----------------------------------------------------------------------
diff --git a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/config/impl/ConfigurationValidationTest.java b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/config/impl/ConfigurationValidationTest.java
index a2f5d33..1931220 100644
--- a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/config/impl/ConfigurationValidationTest.java
+++ b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/config/impl/ConfigurationValidationTest.java
@@ -22,11 +22,11 @@ import org.junit.Test;
 import org.junit.Assert;
 
 import org.apache.activemq.artemis.core.config.impl.FileConfiguration;
-import org.apache.activemq.artemis.tests.util.ServiceTestBase;
+import org.apache.activemq.artemis.tests.util.ActiveMQTestBase;
 import org.apache.activemq.artemis.utils.XMLUtil;
 import org.w3c.dom.Element;
 
-public class ConfigurationValidationTest extends ServiceTestBase
+public class ConfigurationValidationTest extends ActiveMQTestBase
 {
 
    // Constants -----------------------------------------------------

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/328611fd/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/config/impl/ConnectorsServiceTest.java
----------------------------------------------------------------------
diff --git a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/config/impl/ConnectorsServiceTest.java b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/config/impl/ConnectorsServiceTest.java
index a1557be..b744d24 100644
--- a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/config/impl/ConnectorsServiceTest.java
+++ b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/config/impl/ConnectorsServiceTest.java
@@ -21,7 +21,7 @@ import java.util.HashMap;
 import java.util.List;
 
 import org.apache.activemq.artemis.tests.unit.core.config.impl.fakes.FakeConnectorServiceFactory;
-import org.apache.activemq.artemis.tests.util.ServiceTestBase;
+import org.apache.activemq.artemis.tests.util.ActiveMQTestBase;
 import org.apache.activemq.artemis.core.config.Configuration;
 import org.apache.activemq.artemis.core.config.ConnectorServiceConfiguration;
 import org.apache.activemq.artemis.core.config.impl.ConfigurationImpl;
@@ -32,7 +32,7 @@ import org.apache.activemq.artemis.tests.unit.core.config.impl.fakes.FakeConnect
 import org.junit.Before;
 import org.junit.Test;
 
-public class ConnectorsServiceTest extends ServiceTestBase
+public class ConnectorsServiceTest extends ActiveMQTestBase
 {
    private Configuration configuration;
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/328611fd/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/config/impl/TransportConfigurationTest.java
----------------------------------------------------------------------
diff --git a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/config/impl/TransportConfigurationTest.java b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/config/impl/TransportConfigurationTest.java
index cd3b0e2..d347191 100644
--- a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/config/impl/TransportConfigurationTest.java
+++ b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/config/impl/TransportConfigurationTest.java
@@ -16,14 +16,14 @@
  */
 package org.apache.activemq.artemis.tests.unit.core.config.impl;
 
-import org.apache.activemq.artemis.tests.util.ServiceTestBase;
+import org.apache.activemq.artemis.tests.util.ActiveMQTestBase;
 import org.junit.Test;
 
 import org.junit.Assert;
 
 import org.apache.activemq.artemis.api.core.TransportConfiguration;
 
-public class TransportConfigurationTest extends ServiceTestBase
+public class TransportConfigurationTest extends ActiveMQTestBase
 {
 
    // Constants -----------------------------------------------------

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/328611fd/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/journal/impl/AlignedJournalImplTest.java
----------------------------------------------------------------------
diff --git a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/journal/impl/AlignedJournalImplTest.java b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/journal/impl/AlignedJournalImplTest.java
index ebf8f6c..98e9b7e 100644
--- a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/journal/impl/AlignedJournalImplTest.java
+++ b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/journal/impl/AlignedJournalImplTest.java
@@ -16,7 +16,7 @@
  */
 package org.apache.activemq.artemis.tests.unit.core.journal.impl;
 import org.apache.activemq.artemis.tests.unit.core.journal.impl.fakes.FakeSequentialFileFactory;
-import org.apache.activemq.artemis.tests.util.ServiceTestBase;
+import org.apache.activemq.artemis.tests.util.ActiveMQTestBase;
 import org.junit.Before;
 import org.junit.After;
 
@@ -44,7 +44,7 @@ import org.apache.activemq.artemis.core.journal.impl.JournalImpl;
 import org.apache.activemq.artemis.tests.unit.UnitTestLogger;
 import org.apache.activemq.artemis.tests.unit.core.journal.impl.fakes.SimpleEncoding;
 
-public class AlignedJournalImplTest extends ServiceTestBase
+public class AlignedJournalImplTest extends ActiveMQTestBase
 {
 
    // Constants -----------------------------------------------------
@@ -1223,7 +1223,7 @@ public class AlignedJournalImplTest extends ServiceTestBase
             try
             {
                latchReady.countDown();
-               ServiceTestBase.waitForLatch(latchStart);
+               ActiveMQTestBase.waitForLatch(latchStart);
                for (int i = 0; i < NUMBER_OF_ELEMENTS; i++)
                {
                   journalImpl.appendAddRecordTransactional(i, i, (byte)1, new SimpleEncoding(50, (byte)1));
@@ -1247,7 +1247,7 @@ public class AlignedJournalImplTest extends ServiceTestBase
             try
             {
                latchReady.countDown();
-               ServiceTestBase.waitForLatch(latchStart);
+               ActiveMQTestBase.waitForLatch(latchStart);
                for (int i = 0; i < NUMBER_OF_ELEMENTS; i++)
                {
                   Integer toDelete = queueDelete.poll(10, TimeUnit.SECONDS);
@@ -1269,7 +1269,7 @@ public class AlignedJournalImplTest extends ServiceTestBase
       t1.start();
       t2.start();
 
-      ServiceTestBase.waitForLatch(latchReady);
+      ActiveMQTestBase.waitForLatch(latchReady);
       latchStart.countDown();
 
       t1.join();

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/328611fd/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/journal/impl/CleanBufferTest.java
----------------------------------------------------------------------
diff --git a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/journal/impl/CleanBufferTest.java b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/journal/impl/CleanBufferTest.java
index 498d22c..e0bc864 100644
--- a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/journal/impl/CleanBufferTest.java
+++ b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/journal/impl/CleanBufferTest.java
@@ -17,7 +17,7 @@
 package org.apache.activemq.artemis.tests.unit.core.journal.impl;
 
 import org.apache.activemq.artemis.tests.unit.core.journal.impl.fakes.FakeSequentialFileFactory;
-import org.apache.activemq.artemis.tests.util.ServiceTestBase;
+import org.apache.activemq.artemis.tests.util.ActiveMQTestBase;
 import org.junit.Test;
 
 import java.nio.ByteBuffer;
@@ -29,7 +29,7 @@ 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.NIOSequentialFileFactory;
 
-public class CleanBufferTest extends ServiceTestBase
+public class CleanBufferTest extends ActiveMQTestBase
 {
 
    // Constants -----------------------------------------------------

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/328611fd/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/journal/impl/FileFactoryTestBase.java
----------------------------------------------------------------------
diff --git a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/journal/impl/FileFactoryTestBase.java b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/journal/impl/FileFactoryTestBase.java
index 7063f15..3ad777b 100644
--- a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/journal/impl/FileFactoryTestBase.java
+++ b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/journal/impl/FileFactoryTestBase.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 package org.apache.activemq.artemis.tests.unit.core.journal.impl;
-import org.apache.activemq.artemis.tests.util.ServiceTestBase;
+import org.apache.activemq.artemis.tests.util.ActiveMQTestBase;
 import org.junit.Before;
 
 import java.nio.ByteBuffer;
@@ -25,7 +25,7 @@ import org.junit.Assert;
 import org.apache.activemq.artemis.core.journal.SequentialFile;
 import org.apache.activemq.artemis.core.journal.SequentialFileFactory;
 
-public abstract class FileFactoryTestBase extends ServiceTestBase
+public abstract class FileFactoryTestBase extends ActiveMQTestBase
 {
    protected abstract SequentialFileFactory createFactory();
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/328611fd/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/journal/impl/JournalAsyncTest.java
----------------------------------------------------------------------
diff --git a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/journal/impl/JournalAsyncTest.java b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/journal/impl/JournalAsyncTest.java
index 758f9d7..603bcb5 100644
--- a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/journal/impl/JournalAsyncTest.java
+++ b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/journal/impl/JournalAsyncTest.java
@@ -22,7 +22,7 @@ import java.util.concurrent.TimeUnit;
 
 import org.apache.activemq.artemis.tests.unit.core.journal.impl.fakes.FakeSequentialFileFactory;
 import org.apache.activemq.artemis.tests.unit.core.journal.impl.fakes.SimpleEncoding;
-import org.apache.activemq.artemis.tests.util.ServiceTestBase;
+import org.apache.activemq.artemis.tests.util.ActiveMQTestBase;
 import org.apache.activemq.artemis.core.journal.PreparedTransactionInfo;
 import org.apache.activemq.artemis.core.journal.RecordInfo;
 import org.apache.activemq.artemis.core.journal.impl.JournalImpl;
@@ -31,7 +31,7 @@ import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Test;
 
-public class JournalAsyncTest extends ServiceTestBase
+public class JournalAsyncTest extends ActiveMQTestBase
 {
 
    // Constants -----------------------------------------------------

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/328611fd/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/journal/impl/JournalImplTestBase.java
----------------------------------------------------------------------
diff --git a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/journal/impl/JournalImplTestBase.java b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/journal/impl/JournalImplTestBase.java
index edec8d1..ae7583b 100644
--- a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/journal/impl/JournalImplTestBase.java
+++ b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/journal/impl/JournalImplTestBase.java
@@ -33,13 +33,13 @@ import org.apache.activemq.artemis.core.journal.RecordInfo;
 import org.apache.activemq.artemis.core.journal.SequentialFileFactory;
 import org.apache.activemq.artemis.core.journal.TestableJournal;
 import org.apache.activemq.artemis.core.journal.impl.JournalImpl;
-import org.apache.activemq.artemis.tests.util.ServiceTestBase;
+import org.apache.activemq.artemis.tests.util.ActiveMQTestBase;
 import org.apache.activemq.artemis.utils.ReusableLatch;
 import org.junit.After;
 import org.junit.Assert;
 import org.junit.Before;
 
-public abstract class JournalImplTestBase extends ServiceTestBase
+public abstract class JournalImplTestBase extends ActiveMQTestBase
 {
    protected List<RecordInfo> records = new LinkedList<RecordInfo>();
 
@@ -568,7 +568,7 @@ public abstract class JournalImplTestBase extends ServiceTestBase
 
          Assert.assertEquals("type not same", rexpected.isUpdate, ractual.isUpdate);
 
-         ServiceTestBase.assertEqualsByteArrays(rexpected.data, ractual.data);
+         ActiveMQTestBase.assertEqualsByteArrays(rexpected.data, ractual.data);
       }
    }
 
@@ -602,7 +602,7 @@ public abstract class JournalImplTestBase extends ServiceTestBase
       for (int i = 0; i < length; i++)
       {
          // record[i] = RandomUtil.randomByte();
-         record[i] = ServiceTestBase.getSamplebyte(i);
+         record[i] = ActiveMQTestBase.getSamplebyte(i);
       }
       return record;
    }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/328611fd/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/journal/impl/ReclaimerTest.java
----------------------------------------------------------------------
diff --git a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/journal/impl/ReclaimerTest.java b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/journal/impl/ReclaimerTest.java
index 01e1886..5788db9 100644
--- a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/journal/impl/ReclaimerTest.java
+++ b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/journal/impl/ReclaimerTest.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 package org.apache.activemq.artemis.tests.unit.core.journal.impl;
-import org.apache.activemq.artemis.tests.util.ServiceTestBase;
+import org.apache.activemq.artemis.tests.util.ActiveMQTestBase;
 import org.junit.Before;
 
 import org.junit.Test;
@@ -32,7 +32,7 @@ import org.apache.activemq.artemis.core.journal.impl.JournalFile;
 import org.apache.activemq.artemis.core.journal.impl.JournalImpl;
 import org.apache.activemq.artemis.core.journal.impl.Reclaimer;
 
-public class ReclaimerTest extends ServiceTestBase
+public class ReclaimerTest extends ActiveMQTestBase
 {
    private JournalFile[] files;
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/328611fd/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/journal/impl/SequentialFileFactoryTestBase.java
----------------------------------------------------------------------
diff --git a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/journal/impl/SequentialFileFactoryTestBase.java b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/journal/impl/SequentialFileFactoryTestBase.java
index 146a8f9..38f292e 100644
--- a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/journal/impl/SequentialFileFactoryTestBase.java
+++ b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/journal/impl/SequentialFileFactoryTestBase.java
@@ -17,7 +17,7 @@
 package org.apache.activemq.artemis.tests.unit.core.journal.impl;
 import org.apache.activemq.artemis.api.core.ActiveMQBuffer;
 import org.apache.activemq.artemis.api.core.ActiveMQBuffers;
-import org.apache.activemq.artemis.tests.util.ServiceTestBase;
+import org.apache.activemq.artemis.tests.util.ActiveMQTestBase;
 import org.junit.Before;
 import org.junit.After;
 
@@ -35,7 +35,7 @@ import org.apache.activemq.artemis.core.asyncio.impl.AsynchronousFileImpl;
 import org.apache.activemq.artemis.core.journal.SequentialFile;
 import org.apache.activemq.artemis.core.journal.SequentialFileFactory;
 
-public abstract class SequentialFileFactoryTestBase extends ServiceTestBase
+public abstract class SequentialFileFactoryTestBase extends ActiveMQTestBase
 {
    @Override
    @Before
@@ -58,7 +58,7 @@ public abstract class SequentialFileFactoryTestBase extends ServiceTestBase
 
       factory = null;
 
-      ServiceTestBase.forceGC();
+      ActiveMQTestBase.forceGC();
 
       super.tearDown();
    }
@@ -337,14 +337,14 @@ public abstract class SequentialFileFactoryTestBase extends ServiceTestBase
          Assert.assertEquals(rb3.limit(), bytesRead);
          rb3.rewind();
          rb3.get(rbytes3);
-         ServiceTestBase.assertEqualsByteArrays(bytes3, rbytes3);
+         ActiveMQTestBase.assertEqualsByteArrays(bytes3, rbytes3);
 
          sf.position(rb1.limit());
 
          bytesRead = sf.read(rb2);
          Assert.assertEquals(rb2.limit(), bytesRead);
          rb2.get(rbytes2);
-         ServiceTestBase.assertEqualsByteArrays(bytes2, rbytes2);
+         ActiveMQTestBase.assertEqualsByteArrays(bytes2, rbytes2);
 
          sf.position(0);
 
@@ -352,7 +352,7 @@ public abstract class SequentialFileFactoryTestBase extends ServiceTestBase
          Assert.assertEquals(rb1.limit(), bytesRead);
          rb1.get(rbytes1);
 
-         ServiceTestBase.assertEqualsByteArrays(bytes1, rbytes1);
+         ActiveMQTestBase.assertEqualsByteArrays(bytes1, rbytes1);
 
       }
       finally


Mime
View raw message