activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From clebertsuco...@apache.org
Subject [11/21] activemq-artemis git commit: More test-suite refactoring
Date Thu, 28 May 2015 15:19:02 GMT
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/328611fd/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/RealNodeManagerTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/RealNodeManagerTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/RealNodeManagerTest.java
index d81abcd..4ff083f 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/RealNodeManagerTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/RealNodeManagerTest.java
@@ -20,7 +20,7 @@ import java.util.ArrayList;
 import java.util.List;
 
 import org.apache.activemq.artemis.tests.util.SpawnedVMSupport;
-import org.apache.activemq.artemis.tests.util.ServiceTestBase;
+import org.apache.activemq.artemis.tests.util.ActiveMQTestBase;
 import org.apache.activemq.artemis.core.server.NodeManager;
 import org.apache.activemq.artemis.core.server.impl.FileLockNodeManager;
 import org.apache.activemq.artemis.utils.UUID;
@@ -37,7 +37,7 @@ public class RealNodeManagerTest extends NodeManagerTest
       UUID id1 = nodeManager.getUUID();
       nodeManager.stop();
       nodeManager.start();
-      ServiceTestBase.assertEqualsByteArrays(id1.asBytes(), nodeManager.getUUID().asBytes());
+      ActiveMQTestBase.assertEqualsByteArrays(id1.asBytes(), nodeManager.getUUID().asBytes());
       nodeManager.stop();
    }
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/328611fd/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/bridge/BridgeFailoverTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/bridge/BridgeFailoverTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/bridge/BridgeFailoverTest.java
index 648afdd..956eaad 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/bridge/BridgeFailoverTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/bridge/BridgeFailoverTest.java
@@ -200,7 +200,7 @@ public class BridgeFailoverTest extends MultiServerTestBase
 
       locatorConsumer.close();
 
-      waitForServer(backupServers[4]);
+      waitForServerToStart(backupServers[4]);
 
       for (int i = 100; i < 200; i++)
       {
@@ -268,7 +268,7 @@ public class BridgeFailoverTest extends MultiServerTestBase
       waitForTopology(servers[4], getNumberOfServers() - 1, getNumberOfServers() - 1);
 
       crashAndWaitForFailure(servers[4], createLocator(false, 4));
-      waitForServer(backupServers[4]);
+      waitForServerToStart(backupServers[4]);
 
       startBackups(2);
       startServers(2);

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/328611fd/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/bridge/BridgeReconnectTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/bridge/BridgeReconnectTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/bridge/BridgeReconnectTest.java
index 3a633f3..8aaade6 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/bridge/BridgeReconnectTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/bridge/BridgeReconnectTest.java
@@ -16,22 +16,17 @@
  */
 package org.apache.activemq.artemis.tests.integration.cluster.bridge;
 
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
 import org.apache.activemq.artemis.api.core.ActiveMQException;
 import org.apache.activemq.artemis.api.core.ActiveMQExceptionType;
 import org.apache.activemq.artemis.api.core.ActiveMQNotConnectedException;
 import org.apache.activemq.artemis.api.core.SimpleString;
 import org.apache.activemq.artemis.api.core.TransportConfiguration;
+import org.apache.activemq.artemis.api.core.client.ActiveMQClient;
 import org.apache.activemq.artemis.api.core.client.ClientConsumer;
 import org.apache.activemq.artemis.api.core.client.ClientMessage;
 import org.apache.activemq.artemis.api.core.client.ClientProducer;
 import org.apache.activemq.artemis.api.core.client.ClientSession;
 import org.apache.activemq.artemis.api.core.client.ClientSessionFactory;
-import org.apache.activemq.artemis.api.core.client.ActiveMQClient;
 import org.apache.activemq.artemis.api.core.client.ServerLocator;
 import org.apache.activemq.artemis.api.core.management.QueueControl;
 import org.apache.activemq.artemis.api.core.management.ResourceNames;
@@ -47,10 +42,14 @@ import org.apache.activemq.artemis.core.server.impl.InVMNodeManager;
 import org.apache.activemq.artemis.core.server.management.ManagementService;
 import org.apache.activemq.artemis.spi.core.protocol.RemotingConnection;
 import org.apache.activemq.artemis.tests.integration.IntegrationTestLogger;
-import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
 
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
 public class BridgeReconnectTest extends BridgeTestBase
 {
    private static final IntegrationTestLogger log = IntegrationTestLogger.LOGGER;
@@ -101,14 +100,6 @@ public class BridgeReconnectTest extends BridgeTestBase
       staticConnectors.add(server1tc.getName());
    }
 
-   @Override
-   @After
-   public void tearDown() throws Exception
-   {
-      locator = null;
-      super.tearDown();
-   }
-
    protected boolean isNetty()
    {
       return false;
@@ -329,8 +320,8 @@ public class BridgeReconnectTest extends BridgeTestBase
       // Now we will simulate a failure of the bridge connection between server0 and server1
       server0.stop(true);
 
-      locator = addServerLocator(ActiveMQClient.createServerLocatorWithHA(server2tc));
-      locator.setReconnectAttempts(100);
+      locator = addServerLocator(ActiveMQClient.createServerLocatorWithHA(server2tc))
+              .setReconnectAttempts(100);
       ClientSessionFactory csf0 = addSessionFactory(locator.createSessionFactory(server2tc));
       session0 = csf0.createSession(false, true, true);
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/328611fd/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/bridge/BridgeStartTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/bridge/BridgeStartTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/bridge/BridgeStartTest.java
index 74954e2..3390607 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/bridge/BridgeStartTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/bridge/BridgeStartTest.java
@@ -33,7 +33,7 @@ import org.apache.activemq.artemis.api.core.client.ClientSessionFactory;
 import org.apache.activemq.artemis.api.core.client.ActiveMQClient;
 import org.apache.activemq.artemis.api.core.client.ServerLocator;
 import org.apache.activemq.artemis.tests.integration.IntegrationTestLogger;
-import org.apache.activemq.artemis.tests.util.ServiceTestBase;
+import org.apache.activemq.artemis.tests.util.ActiveMQTestBase;
 import org.apache.activemq.artemis.core.config.BridgeConfiguration;
 import org.apache.activemq.artemis.core.config.CoreQueueConfiguration;
 import org.apache.activemq.artemis.core.remoting.impl.invm.TransportConstants;
@@ -45,7 +45,7 @@ import org.junit.runner.RunWith;
 import org.junit.runners.Parameterized;
 
 @RunWith(value = Parameterized.class)
-public class BridgeStartTest extends ServiceTestBase
+public class BridgeStartTest extends ActiveMQTestBase
 {
 
    @Parameterized.Parameters(name = "isNetty={0}")
@@ -145,10 +145,10 @@ public class BridgeStartTest extends ServiceTestBase
          server1.getConfiguration().setQueueConfigurations(queueConfigs1);
 
          server1.start();
-         waitForServer(server1);
+         waitForServerToStart(server1);
 
          server0.start();
-         waitForServer(server0);
+         waitForServerToStart(server0);
 
          locator = ActiveMQClient.createServerLocatorWithoutHA(server0tc, server1tc);
          ClientSessionFactory sf0 = locator.createSessionFactory(server0tc);
@@ -316,7 +316,7 @@ public class BridgeStartTest extends ServiceTestBase
          // Don't start server 1 yet
 
          server0.start();
-         waitForServer(server0);
+         waitForServerToStart(server0);
 
          locator = ActiveMQClient.createServerLocatorWithoutHA(server0tc, server1tc);
          ClientSessionFactory sf0 = locator.createSessionFactory(server0tc);
@@ -343,7 +343,7 @@ public class BridgeStartTest extends ServiceTestBase
          Thread.sleep(1000);
 
          server1.start();
-         waitForServer(server1);
+         waitForServerToStart(server1);
 
          ClientSessionFactory sf1 = locator.createSessionFactory(server1tc);
 
@@ -410,7 +410,7 @@ public class BridgeStartTest extends ServiceTestBase
          BridgeStartTest.log.info("sent some more messages");
 
          server1.start();
-         waitForServer(server1);
+         waitForServerToStart(server1);
 
          BridgeStartTest.log.info("started server1");
 
@@ -528,7 +528,7 @@ public class BridgeStartTest extends ServiceTestBase
          // Don't start server 1 yet
 
          server0.start();
-         waitForServer(server0);
+         waitForServerToStart(server0);
 
          locator = ActiveMQClient.createServerLocatorWithoutHA(server0tc, server1tc);
          ClientSessionFactory sf0 = locator.createSessionFactory(server0tc);
@@ -557,7 +557,7 @@ public class BridgeStartTest extends ServiceTestBase
          // JMSBridge should be stopped since retries = 0
 
          server1.start();
-         waitForServer(server1);
+         waitForServerToStart(server1);
 
          ClientSessionFactory sf1 = locator.createSessionFactory(server1tc);
 
@@ -679,10 +679,10 @@ public class BridgeStartTest extends ServiceTestBase
          server1.getConfiguration().setQueueConfigurations(queueConfigs1);
 
          server1.start();
-         waitForServer(server1);
+         waitForServerToStart(server1);
 
          server0.start();
-         waitForServer(server0);
+         waitForServerToStart(server0);
 
          locator = ActiveMQClient.createServerLocatorWithoutHA(server0tc, server1tc);
          ClientSessionFactory sf0 = locator.createSessionFactory(server0tc);

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/328611fd/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/bridge/BridgeTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/bridge/BridgeTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/bridge/BridgeTest.java
index 219429a..57e7970 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/bridge/BridgeTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/bridge/BridgeTest.java
@@ -51,8 +51,8 @@ import org.apache.activemq.artemis.core.server.cluster.impl.BridgeImpl;
 import org.apache.activemq.artemis.core.transaction.impl.TransactionImpl;
 import org.apache.activemq.artemis.spi.core.protocol.RemotingConnection;
 import org.apache.activemq.artemis.tests.integration.IntegrationTestLogger;
+import org.apache.activemq.artemis.tests.util.ActiveMQTestBase;
 import org.apache.activemq.artemis.tests.util.RandomUtil;
-import org.apache.activemq.artemis.tests.util.ServiceTestBase;
 import org.apache.activemq.artemis.utils.LinkedListIterator;
 import org.apache.activemq.artemis.utils.ReusableLatch;
 import org.junit.Assert;
@@ -74,7 +74,7 @@ import java.util.concurrent.TimeUnit;
 import java.util.concurrent.atomic.AtomicInteger;
 
 @RunWith(value = Parameterized.class)
-public class BridgeTest extends ServiceTestBase
+public class BridgeTest extends ActiveMQTestBase
 {
 
    private ActiveMQServer server0;
@@ -233,7 +233,7 @@ public class BridgeTest extends ServiceTestBase
 
          if (largeMessage)
          {
-            message.setBodyInputStream(ServiceTestBase.createFakeLargeStream(1024 * 1024));
+            message.setBodyInputStream(ActiveMQTestBase.createFakeLargeStream(1024 * 1024));
          }
 
          message.putIntProperty(propKey, i);
@@ -270,8 +270,10 @@ public class BridgeTest extends ServiceTestBase
       sf1.close();
 
       closeFields();
-      assertEquals(0, loadQueues(server0).size());
-
+      if (server0.getConfiguration().isPersistenceEnabled())
+      {
+         assertEquals(0, loadQueues(server0).size());
+      }
    }
 
 
@@ -410,7 +412,7 @@ public class BridgeTest extends ServiceTestBase
 
          if (largeMessage)
          {
-            message.setBodyInputStream(ServiceTestBase.createFakeLargeStream(1024 * 1024));
+            message.setBodyInputStream(ActiveMQTestBase.createFakeLargeStream(1024 * 1024));
          }
 
          message.putIntProperty(propKey, i);
@@ -595,7 +597,7 @@ public class BridgeTest extends ServiceTestBase
 
          if (largeMessage)
          {
-            message.setBodyInputStream(ServiceTestBase.createFakeLargeStream(1024 * 1024));
+            message.setBodyInputStream(ActiveMQTestBase.createFakeLargeStream(1024 * 1024));
          }
 
          producer0.send(message);
@@ -613,7 +615,7 @@ public class BridgeTest extends ServiceTestBase
 
          if (largeMessage)
          {
-            message.setBodyInputStream(ServiceTestBase.createFakeLargeStream(1024 * 1024));
+            message.setBodyInputStream(ActiveMQTestBase.createFakeLargeStream(1024 * 1024));
          }
 
          producer0.send(message);
@@ -1076,9 +1078,10 @@ public class BridgeTest extends ServiceTestBase
 
       sf1.close();
 
-      assertEquals(0, loadQueues(server0).size());
-
-
+      if (server0.getConfiguration().isPersistenceEnabled())
+      {
+         assertEquals(0, loadQueues(server0).size());
+      }
    }
 
    @Test
@@ -1210,8 +1213,8 @@ public class BridgeTest extends ServiceTestBase
             {
                ServerLocator locator = addServerLocator(ActiveMQClient.createServerLocatorWithoutHA(server0tc));
 
-               locator.setBlockOnDurableSend(false);
-               locator.setBlockOnNonDurableSend(false);
+               locator.setBlockOnDurableSend(false)
+                       .setBlockOnNonDurableSend(false);
 
                ClientSessionFactory sf = null;
 
@@ -1871,10 +1874,6 @@ public class BridgeTest extends ServiceTestBase
 
       sf1.close();
       closeFields();
-
-      assertEquals(0, loadQueues(server0).size());
-
-
    }
 
    /**

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/328611fd/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/bridge/BridgeTestBase.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/bridge/BridgeTestBase.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/bridge/BridgeTestBase.java
index dd542f5..d339591 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/bridge/BridgeTestBase.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/bridge/BridgeTestBase.java
@@ -20,7 +20,7 @@ import java.util.Map;
 import java.util.concurrent.TimeUnit;
 
 import org.apache.activemq.artemis.api.core.TransportConfiguration;
-import org.apache.activemq.artemis.tests.util.ServiceTestBase;
+import org.apache.activemq.artemis.tests.util.ActiveMQTestBase;
 import org.apache.activemq.artemis.core.config.Configuration;
 import org.apache.activemq.artemis.core.config.ha.SharedStoreMasterPolicyConfiguration;
 import org.apache.activemq.artemis.core.config.ha.SharedStoreSlavePolicyConfiguration;
@@ -31,7 +31,7 @@ import org.apache.activemq.artemis.core.server.NodeManager;
 import org.apache.activemq.artemis.tests.util.InVMNodeManagerServer;
 import org.junit.After;
 
-public abstract class BridgeTestBase extends ServiceTestBase
+public abstract class BridgeTestBase extends ActiveMQTestBase
 {
 
    @Override
@@ -48,11 +48,6 @@ public abstract class BridgeTestBase extends ServiceTestBase
       return createActiveMQServer(id, params, netty, null);
    }
 
-   protected ActiveMQServer createActiveMQServer(final int id, final boolean netty, final Map<String, Object> params, NodeManager nodeManager) throws Exception
-   {
-      return createActiveMQServer(id, params, netty, nodeManager);
-   }
-
    protected ActiveMQServer createActiveMQServer(final int id,
                                                  final Map<String, Object> params,
                                                  final boolean netty,
@@ -84,17 +79,17 @@ public abstract class BridgeTestBase extends ServiceTestBase
          .addAcceptorConfiguration(tc)
          .setHAPolicyConfiguration(new SharedStoreMasterPolicyConfiguration());
 
-      ActiveMQServer service;
+      ActiveMQServer server;
       if (nodeManager == null)
       {
-         service = ActiveMQServers.newActiveMQServer(serviceConf, true);
+         server = ActiveMQServers.newActiveMQServer(serviceConf, true);
       }
       else
       {
-         service = new InVMNodeManagerServer(serviceConf, nodeManager);
+         server = new InVMNodeManagerServer(serviceConf, nodeManager);
       }
 
-      return addServer(service);
+      return addServer(server);
    }
 
    protected ActiveMQServer createBackupActiveMQServer(final int id,
@@ -130,16 +125,16 @@ public abstract class BridgeTestBase extends ServiceTestBase
          .addAcceptorConfiguration(tc)
          .setHAPolicyConfiguration(new SharedStoreSlavePolicyConfiguration());
 
-      ActiveMQServer service;
+      ActiveMQServer server;
       if (nodeManager == null)
       {
-         service = ActiveMQServers.newActiveMQServer(serviceConf, true);
+         server = ActiveMQServers.newActiveMQServer(serviceConf, true);
       }
       else
       {
-         service = new InVMNodeManagerServer(serviceConf, nodeManager);
+         server = new InVMNodeManagerServer(serviceConf, nodeManager);
       }
-      return addServer(service);
+      return addServer(server);
    }
 
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/328611fd/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/bridge/BridgeWithDiscoveryGroupStartTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/bridge/BridgeWithDiscoveryGroupStartTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/bridge/BridgeWithDiscoveryGroupStartTest.java
index 1832e36..ad7cbf9 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/bridge/BridgeWithDiscoveryGroupStartTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/bridge/BridgeWithDiscoveryGroupStartTest.java
@@ -42,14 +42,14 @@ import org.apache.activemq.artemis.core.remoting.impl.netty.NettyConnectorFactor
 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.cluster.Bridge;
-import org.apache.activemq.artemis.tests.util.ServiceTestBase;
+import org.apache.activemq.artemis.tests.util.ActiveMQTestBase;
 import org.junit.Assert;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.junit.runners.Parameterized;
 
 @RunWith(value = Parameterized.class)
-public class BridgeWithDiscoveryGroupStartTest extends ServiceTestBase
+public class BridgeWithDiscoveryGroupStartTest extends ActiveMQTestBase
 {
 
    @Parameterized.Parameters(name = "isNetty={0}")

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/328611fd/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/distribution/ClusterTestBase.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/distribution/ClusterTestBase.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/distribution/ClusterTestBase.java
index e3e63db..a53391a 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/distribution/ClusterTestBase.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/distribution/ClusterTestBase.java
@@ -62,7 +62,7 @@ import org.apache.activemq.artemis.core.server.group.GroupingHandler;
 import org.apache.activemq.artemis.core.server.group.impl.GroupingHandlerConfiguration;
 import org.apache.activemq.artemis.core.server.impl.InVMNodeManager;
 import org.apache.activemq.artemis.tests.integration.IntegrationTestLogger;
-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;
@@ -82,7 +82,7 @@ import java.util.Set;
 import java.util.concurrent.TimeUnit;
 import java.util.concurrent.atomic.AtomicInteger;
 
-public abstract class ClusterTestBase extends ServiceTestBase
+public abstract class ClusterTestBase extends ActiveMQTestBase
 {
    private static final IntegrationTestLogger log = IntegrationTestLogger.LOGGER;
 
@@ -137,7 +137,7 @@ public abstract class ClusterTestBase extends ServiceTestBase
 
       forceGC();
 
-      ServiceTestBase.checkFreePort(ClusterTestBase.PORTS);
+      ActiveMQTestBase.checkFreePort(ClusterTestBase.PORTS);
 
       consumers = new ConsumerHolder[ClusterTestBase.MAX_CONSUMERS];
 
@@ -170,7 +170,6 @@ public abstract class ClusterTestBase extends ServiceTestBase
    @After
    public void tearDown() throws Exception
    {
-      log.info("#test tearDown");
       logTopologyDiagram();
       for (int i = 0; i < MAX_SERVERS; i++)
       {
@@ -186,7 +185,7 @@ public abstract class ClusterTestBase extends ServiceTestBase
 
       super.tearDown();
 
-      ServiceTestBase.checkFreePort(ClusterTestBase.PORTS);
+      ActiveMQTestBase.checkFreePort(ClusterTestBase.PORTS);
 
    }
 
@@ -434,7 +433,7 @@ public abstract class ClusterTestBase extends ServiceTestBase
 
          Thread.sleep(10);
       }
-      while (System.currentTimeMillis() - start < ServiceTestBase.WAIT_TIMEOUT);
+      while (System.currentTimeMillis() - start < ActiveMQTestBase.WAIT_TIMEOUT);
 
       throw new IllegalStateException("Timed out waiting for messages (messageCount = " + messageCount +
                                          ", expecting = " +
@@ -443,7 +442,7 @@ public abstract class ClusterTestBase extends ServiceTestBase
 
    protected void waitForServerRestart(final int node) throws Exception
    {
-      long waitTimeout = ServiceTestBase.WAIT_TIMEOUT;
+      long waitTimeout = ActiveMQTestBase.WAIT_TIMEOUT;
       if (!isSharedStore())
       {
          //it should be greater than
@@ -483,7 +482,7 @@ public abstract class ClusterTestBase extends ServiceTestBase
          throw new IllegalArgumentException("No server at " + node);
       }
 
-      long timeout = ServiceTestBase.WAIT_TIMEOUT;
+      long timeout = ActiveMQTestBase.WAIT_TIMEOUT;
 
 
       if (waitForBindings(server, address, local, expectedBindingCount, expectedConsumerCount, timeout))
@@ -662,7 +661,7 @@ public abstract class ClusterTestBase extends ServiceTestBase
       {
          // Proxy the failure and print a dump into System.out, so it is captured by Jenkins reports
          e.printStackTrace();
-         System.out.println(ServiceTestBase.threadDump(" - fired by ClusterTestBase::addConsumer"));
+         System.out.println(ActiveMQTestBase.threadDump(" - fired by ClusterTestBase::addConsumer"));
 
          throw e;
       }
@@ -1540,7 +1539,7 @@ public abstract class ClusterTestBase extends ServiceTestBase
 
       if (netty)
       {
-         serverTotc = new TransportConfiguration(ServiceTestBase.NETTY_CONNECTOR_FACTORY, params);
+         serverTotc = new TransportConfiguration(ActiveMQTestBase.NETTY_CONNECTOR_FACTORY, params);
       }
       else
       {
@@ -1558,8 +1557,8 @@ public abstract class ClusterTestBase extends ServiceTestBase
 
       locators[node].setProtocolManagerFactory(ActiveMQServerSideProtocolManagerFactory.getInstance());
 
-      locators[node].setBlockOnNonDurableSend(true);
-      locators[node].setBlockOnDurableSend(true);
+      locators[node].setBlockOnNonDurableSend(true)
+              .setBlockOnDurableSend(true);
       addServerLocator(locators[node]);
       ClientSessionFactory sf = createSessionFactory(locators[node]);
 
@@ -1581,17 +1580,18 @@ public abstract class ClusterTestBase extends ServiceTestBase
 
       if (netty)
       {
-         serverTotc = new TransportConfiguration(ServiceTestBase.NETTY_CONNECTOR_FACTORY, params);
+         serverTotc = new TransportConfiguration(ActiveMQTestBase.NETTY_CONNECTOR_FACTORY, params);
       }
       else
       {
          serverTotc = new TransportConfiguration(INVM_CONNECTOR_FACTORY, params);
       }
 
-      locators[node] = ActiveMQClient.createServerLocatorWithoutHA(serverTotc);
-      locators[node].setBlockOnNonDurableSend(true);
-      locators[node].setBlockOnDurableSend(true);
-      locators[node].setReconnectAttempts(reconnectAttempts);
+      locators[node] = ActiveMQClient.createServerLocatorWithoutHA(serverTotc)
+              .setBlockOnNonDurableSend(true)
+              .setBlockOnDurableSend(true)
+              .setReconnectAttempts(reconnectAttempts);
+
       addServerLocator(locators[node]);
       ClientSessionFactory sf = createSessionFactory(locators[node]);
 
@@ -1609,12 +1609,13 @@ public abstract class ClusterTestBase extends ServiceTestBase
 
       TransportConfiguration serverToTC = createTransportConfiguration(netty, false, params);
 
-      locators[node] = addServerLocator(ActiveMQClient.createServerLocatorWithHA(serverToTC));
-      locators[node].setRetryInterval(100);
-      locators[node].setRetryIntervalMultiplier(1d);
-      locators[node].setReconnectAttempts(-1);
-      locators[node].setBlockOnNonDurableSend(blocking);
-      locators[node].setBlockOnDurableSend(blocking);
+      locators[node] = addServerLocator(ActiveMQClient.createServerLocatorWithHA(serverToTC))
+              .setRetryInterval(100)
+              .setRetryIntervalMultiplier(1d)
+              .setReconnectAttempts(-1)
+              .setBlockOnNonDurableSend(blocking)
+              .setBlockOnDurableSend(blocking);
+
       final String identity = "TestClientConnector,live=" + node + ",backup=" + backupNode;
       ((ServerLocatorInternal) locators[node]).setIdentity(identity);
 
@@ -1707,7 +1708,7 @@ public abstract class ClusterTestBase extends ServiceTestBase
       server.addProtocolManagerFactory(new CoreProtocolManagerFactory());
 
       server.setIdentity(this.getClass().getSimpleName() + "/Live(" + node + ")");
-      servers[node] = server;
+      servers[node] = addServer(server);
    }
 
    /**
@@ -1759,7 +1760,7 @@ public abstract class ClusterTestBase extends ServiceTestBase
          server = addServer(ActiveMQServers.newActiveMQServer(configuration, enablePersistency));
       }
       server.setIdentity(this.getClass().getSimpleName() + "/Backup(" + node + " of live " + liveNode + ")");
-      servers[node] = server;
+      servers[node] = addServer(server);
    }
 
    protected void setupLiveServerWithDiscovery(final int node,
@@ -2024,14 +2025,14 @@ public abstract class ClusterTestBase extends ServiceTestBase
          serverFrom.getConfiguration().getConnectorConfigurations().put(serverTotc.getName(), serverTotc);
          pairs.add(serverTotc.getName());
       }
-      Configuration conf = serverFrom.getConfiguration();
+      Configuration config = serverFrom.getConfiguration();
       ClusterConnectionConfiguration clusterConf =
          createClusterConfig(name, address, forwardWhenNoConsumers,
                              maxHops,
                              connectorFrom,
                              pairs);
 
-      conf.getClusterConfigurations().add(clusterConf);
+      config.getClusterConfigurations().add(clusterConf);
    }
 
    protected void setupClusterConnection(final String name,
@@ -2061,7 +2062,7 @@ public abstract class ClusterTestBase extends ServiceTestBase
          serverFrom.getConfiguration().getConnectorConfigurations().put(serverTotc.getName(), serverTotc);
          pairs.add(serverTotc.getName());
       }
-      Configuration conf = serverFrom.getConfiguration();
+      Configuration config = serverFrom.getConfiguration();
 
       ClusterConnectionConfiguration clusterConf = new ClusterConnectionConfiguration()
          .setName(name)
@@ -2076,7 +2077,7 @@ public abstract class ClusterTestBase extends ServiceTestBase
          .setConfirmationWindowSize(1024)
          .setStaticConnectors(pairs);
 
-      conf.getClusterConfigurations().add(clusterConf);
+      config.getClusterConfigurations().add(clusterConf);
    }
 
    private ClusterConnectionConfiguration createClusterConfig(final String name, final String address,
@@ -2151,7 +2152,7 @@ public abstract class ClusterTestBase extends ServiceTestBase
 
       TransportConfiguration connectorConfig = createTransportConfiguration(netty, false, generateParams(node, netty));
       server.getConfiguration().getConnectorConfigurations().put(name, connectorConfig);
-      Configuration conf = server.getConfiguration();
+      Configuration config = server.getConfiguration();
       ClusterConnectionConfiguration clusterConf = new ClusterConnectionConfiguration()
          .setName(name)
          .setAddress(address)
@@ -2162,7 +2163,7 @@ public abstract class ClusterTestBase extends ServiceTestBase
          .setMaxHops(maxHops)
          .setConfirmationWindowSize(1024)
          .setDiscoveryGroupName(discoveryGroupName);
-      List<ClusterConnectionConfiguration> clusterConfs = conf.getClusterConfigurations();
+      List<ClusterConnectionConfiguration> clusterConfs = config.getClusterConfigurations();
 
       clusterConfs.add(clusterConf);
    }
@@ -2189,7 +2190,7 @@ public abstract class ClusterTestBase extends ServiceTestBase
          servers[node].start();
 
          log.info("started server " + servers[node]);
-         waitForServer(servers[node]);
+         waitForServerToStart(servers[node]);
       }
    }
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/328611fd/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/distribution/ClusteredGroupingTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/distribution/ClusteredGroupingTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/distribution/ClusteredGroupingTest.java
index a3101e2..5da9e58 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/distribution/ClusteredGroupingTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/distribution/ClusteredGroupingTest.java
@@ -16,15 +16,6 @@
  */
 package org.apache.activemq.artemis.tests.integration.cluster.distribution;
 
-import java.util.ArrayList;
-import java.util.List;
-import java.util.UUID;
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Executors;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.atomic.AtomicInteger;
-
 import org.apache.activemq.artemis.api.core.ActiveMQException;
 import org.apache.activemq.artemis.api.core.Message;
 import org.apache.activemq.artemis.api.core.SimpleString;
@@ -34,7 +25,6 @@ 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.management.CoreNotificationType;
-import org.apache.activemq.artemis.tests.integration.IntegrationTestLogger;
 import org.apache.activemq.artemis.core.postoffice.impl.BindingsImpl;
 import org.apache.activemq.artemis.core.server.group.GroupingHandler;
 import org.apache.activemq.artemis.core.server.group.UnproposalListener;
@@ -47,9 +37,18 @@ import org.apache.activemq.artemis.core.server.management.Notification;
 import org.apache.activemq.artemis.core.server.management.NotificationListener;
 import org.apache.activemq.artemis.core.settings.impl.AddressFullMessagePolicy;
 import org.apache.activemq.artemis.core.settings.impl.AddressSettings;
-import org.junit.After;
+import org.apache.activemq.artemis.tests.integration.IntegrationTestLogger;
 import org.junit.Test;
 
+import java.util.ArrayList;
+import java.util.List;
+import java.util.UUID;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.atomic.AtomicInteger;
+
 public class ClusteredGroupingTest extends ClusterTestBase
 {
 
@@ -1733,16 +1732,6 @@ public class ClusteredGroupingTest extends ClusterTestBase
       verifyReceiveAllWithGroupIDRoundRobin(0, 30, 0, 1, 2);
    }
 
-   @Override
-   @After
-   public void tearDown() throws Exception
-   {
-      closeAllConsumers();
-      closeAllSessionFactories();
-      closeAllServerLocatorsFactories();
-      super.tearDown();
-   }
-
    public boolean isNetty()
    {
       return true;

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/328611fd/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/distribution/MessageRedistributionTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/distribution/MessageRedistributionTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/distribution/MessageRedistributionTest.java
index a18fa01..a24dd3d 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/distribution/MessageRedistributionTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/distribution/MessageRedistributionTest.java
@@ -475,8 +475,7 @@ public class MessageRedistributionTest extends ClusterTestBase
    {
       setupCluster(false);
 
-      AddressSettings setting = new AddressSettings();
-      setting.setRedeliveryDelay(10000);
+      AddressSettings setting = new AddressSettings().setRedeliveryDelay(10000);
       servers[0].getAddressSettingsRepository().addMatch("queues.testaddress", setting);
       servers[0].getAddressSettingsRepository().addMatch("queue0", setting);
       servers[1].getAddressSettingsRepository().addMatch("queue0", setting);
@@ -1072,10 +1071,10 @@ public class MessageRedistributionTest extends ClusterTestBase
    {
       setupCluster(false);
 
-      AddressSettings as = new AddressSettings();
-      as.setAddressFullMessagePolicy(AddressFullMessagePolicy.PAGE);
-      as.setPageSizeBytes(10000);
-      as.setMaxSizeBytes(20000);
+      AddressSettings as = new AddressSettings()
+              .setAddressFullMessagePolicy(AddressFullMessagePolicy.PAGE)
+              .setPageSizeBytes(10000)
+              .setMaxSizeBytes(20000);
 
       getServer(0).getAddressSettingsRepository().addMatch("queues.*", as);
       getServer(1).getAddressSettingsRepository().addMatch("queues.*", as);
@@ -1148,8 +1147,7 @@ public class MessageRedistributionTest extends ClusterTestBase
 
    protected void setRedistributionDelay(final long delay)
    {
-      AddressSettings as = new AddressSettings();
-      as.setRedistributionDelay(delay);
+      AddressSettings as = new AddressSettings().setRedistributionDelay(delay);
 
       getServer(0).getAddressSettingsRepository().addMatch("queues.*", as);
       getServer(1).getAddressSettingsRepository().addMatch("queues.*", as);

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/328611fd/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/distribution/MessageRedistributionWithDiscoveryTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/distribution/MessageRedistributionWithDiscoveryTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/distribution/MessageRedistributionWithDiscoveryTest.java
index f117f76..ab205da 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/distribution/MessageRedistributionWithDiscoveryTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/distribution/MessageRedistributionWithDiscoveryTest.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 package org.apache.activemq.artemis.tests.integration.cluster.distribution;
-import org.apache.activemq.artemis.tests.util.ServiceTestBase;
+import org.apache.activemq.artemis.tests.util.ActiveMQTestBase;
 import org.junit.Assert;
 import org.junit.Before;
 
@@ -34,9 +34,9 @@ import org.apache.activemq.artemis.core.settings.impl.AddressSettings;
 
 public class MessageRedistributionWithDiscoveryTest extends ClusterTestBase
 {
-   protected final String groupAddress = ServiceTestBase.getUDPDiscoveryAddress();
+   protected final String groupAddress = ActiveMQTestBase.getUDPDiscoveryAddress();
 
-   protected final int groupPort = ServiceTestBase.getUDPDiscoveryPort();
+   protected final int groupPort = ActiveMQTestBase.getUDPDiscoveryPort();
 
    protected boolean isNetty()
    {
@@ -77,9 +77,9 @@ public class MessageRedistributionWithDiscoveryTest extends ClusterTestBase
                                    isNetty(),
                                    false);
 
-      AddressSettings setting = new AddressSettings();
-      setting.setRedeliveryDelay(0);
-      setting.setRedistributionDelay(0);
+      AddressSettings setting = new AddressSettings()
+              .setRedeliveryDelay(0)
+              .setRedistributionDelay(0);
 
       servers[server].getAddressSettingsRepository().addMatch("#", setting);
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/328611fd/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/distribution/SimpleSymmetricClusterTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/distribution/SimpleSymmetricClusterTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/distribution/SimpleSymmetricClusterTest.java
index d1bc092..03a0cc9 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/distribution/SimpleSymmetricClusterTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/distribution/SimpleSymmetricClusterTest.java
@@ -17,8 +17,6 @@
 package org.apache.activemq.artemis.tests.integration.cluster.distribution;
 
 import org.apache.activemq.artemis.tests.integration.IntegrationTestLogger;
-import org.junit.After;
-import org.junit.Before;
 import org.junit.Test;
 
 public class SimpleSymmetricClusterTest extends ClusterTestBase
@@ -36,22 +34,6 @@ public class SimpleSymmetricClusterTest extends ClusterTestBase
 
    // Public --------------------------------------------------------
 
-   @Override
-   @Before
-   public void setUp() throws Exception
-   {
-      super.setUp();
-   }
-
-   @Override
-   @After
-   public void tearDown() throws Exception
-   {
-      log.info("#test tearDown " + loopNumber);
-      stopServers(0, 1, 2, 3, 4);
-      super.tearDown();
-   }
-
    public boolean isNetty()
    {
       return false;

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/328611fd/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/distribution/SymmetricClusterTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/distribution/SymmetricClusterTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/distribution/SymmetricClusterTest.java
index 71c83c0..5ac794b 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/distribution/SymmetricClusterTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/distribution/SymmetricClusterTest.java
@@ -15,11 +15,10 @@
  * limitations under the License.
  */
 package org.apache.activemq.artemis.tests.integration.cluster.distribution;
+
 import org.apache.activemq.artemis.tests.integration.IntegrationTestLogger;
-import org.apache.activemq.artemis.tests.util.ServiceTestBase;
+import org.apache.activemq.artemis.tests.util.ActiveMQTestBase;
 import org.junit.Before;
-import org.junit.After;
-
 import org.junit.Test;
 
 /**
@@ -40,16 +39,6 @@ public class SymmetricClusterTest extends ClusterTestBase
       setupServers();
    }
 
-   @Override
-   @After
-   public void tearDown() throws Exception
-   {
-      log.info("#test tearDown");
-      stopServers();
-
-      super.tearDown();
-   }
-
    protected boolean isNetty()
    {
       return false;
@@ -153,7 +142,7 @@ public class SymmetricClusterTest extends ClusterTestBase
       }
       catch (Throwable e)
       {
-         System.out.println(ServiceTestBase.threadDump("SymmetricClusterTest::testStopAllStartAll"));
+         System.out.println(ActiveMQTestBase.threadDump("SymmetricClusterTest::testStopAllStartAll"));
          throw e;
       }
 

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

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

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/328611fd/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/AlmostLargeAsynchronousFailoverTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/AlmostLargeAsynchronousFailoverTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/AlmostLargeAsynchronousFailoverTest.java
index 0dd4d5a..b25977f 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/AlmostLargeAsynchronousFailoverTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/AlmostLargeAsynchronousFailoverTest.java
@@ -36,10 +36,9 @@ public class AlmostLargeAsynchronousFailoverTest extends AsynchronousFailoverTes
    @Override
    protected ServerLocatorInternal getServerLocator() throws Exception
    {
-      ServerLocatorInternal locator = super.getServerLocator();
-      locator.setMinLargeMessageSize(1024 * 1024);
-      locator.setProducerWindowSize(10 * 1024);
-      return locator;
+      return (ServerLocatorInternal) super.getServerLocator()
+              .setMinLargeMessageSize(1024 * 1024)
+              .setProducerWindowSize(10 * 1024);
    }
 
    @Override

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/328611fd/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/AsynchronousFailoverTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/AsynchronousFailoverTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/AsynchronousFailoverTest.java
index 739b1f4..297b5a6 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/AsynchronousFailoverTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/AsynchronousFailoverTest.java
@@ -162,11 +162,11 @@ public class AsynchronousFailoverTest extends FailoverTestBase
          for (int i = 0; i < numIts; i++)
          {
             AsynchronousFailoverTest.log.info("Iteration " + i);
-            ServerLocator locator = getServerLocator();
-            locator.setBlockOnNonDurableSend(true);
-            locator.setBlockOnDurableSend(true);
-            locator.setReconnectAttempts(-1);
-            locator.setConfirmationWindowSize(10 * 1024 * 1024);
+            ServerLocator locator = getServerLocator()
+                    .setBlockOnNonDurableSend(true)
+                    .setBlockOnDurableSend(true)
+                    .setReconnectAttempts(-1)
+                    .setConfirmationWindowSize(10 * 1024 * 1024);
             sf = createSessionFactoryAndWaitForTopology(locator, 2);
             try
             {

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/328611fd/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/AutomaticColocatedQuorumVoteTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/AutomaticColocatedQuorumVoteTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/AutomaticColocatedQuorumVoteTest.java
index d251954..7dfa3d4 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/AutomaticColocatedQuorumVoteTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/AutomaticColocatedQuorumVoteTest.java
@@ -32,7 +32,7 @@ import org.apache.activemq.artemis.core.config.ha.SharedStoreMasterPolicyConfigu
 import org.apache.activemq.artemis.core.config.ha.SharedStoreSlavePolicyConfiguration;
 import org.apache.activemq.artemis.core.server.ActiveMQServer;
 import org.apache.activemq.artemis.core.server.impl.ActiveMQServerImpl;
-import org.apache.activemq.artemis.tests.util.ServiceTestBase;
+import org.apache.activemq.artemis.tests.util.ActiveMQTestBase;
 import org.junit.Assert;
 import org.junit.Test;
 import org.junit.runner.RunWith;
@@ -47,7 +47,7 @@ import java.util.Map;
 import java.util.Set;
 
 @RunWith(value = Parameterized.class)
-public class AutomaticColocatedQuorumVoteTest extends ServiceTestBase
+public class AutomaticColocatedQuorumVoteTest extends ActiveMQTestBase
 {
    private final boolean replicated;
 
@@ -309,7 +309,7 @@ public class AutomaticColocatedQuorumVoteTest extends ServiceTestBase
 
    private Configuration getConfiguration(String identity, boolean scaleDown, TransportConfiguration liveConnector, TransportConfiguration liveAcceptor, TransportConfiguration... otherLiveNodes) throws Exception
    {
-      Configuration configuration = createDefaultConfig()
+      Configuration configuration = createDefaultInVMConfig()
          .clearAcceptorConfigurations()
          .addAcceptorConfiguration(liveAcceptor)
          .addConnectorConfiguration(liveConnector.getName(), liveConnector)

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/328611fd/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/BackupAuthenticationTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/BackupAuthenticationTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/BackupAuthenticationTest.java
index 0fe5124..0544883 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/BackupAuthenticationTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/BackupAuthenticationTest.java
@@ -46,7 +46,7 @@ public class BackupAuthenticationTest extends FailoverTestBase
    @Test
    public void testPasswordSetting() throws Exception
    {
-      waitForServer(liveServer.getServer());
+      waitForServerToStart(liveServer.getServer());
       backupServer.start();
       assertTrue(latch.await(5, TimeUnit.SECONDS));
       /*

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/328611fd/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/BackupSyncJournalTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/BackupSyncJournalTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/BackupSyncJournalTest.java
index 5314385..3283a9c 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/BackupSyncJournalTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/BackupSyncJournalTest.java
@@ -16,14 +16,6 @@
  */
 package org.apache.activemq.artemis.tests.integration.cluster.failover;
 
-import java.io.File;
-import java.io.RandomAccessFile;
-import java.nio.ByteBuffer;
-import java.nio.channels.FileChannel;
-import java.util.HashSet;
-import java.util.Set;
-import java.util.concurrent.TimeUnit;
-
 import org.apache.activemq.artemis.api.core.ActiveMQException;
 import org.apache.activemq.artemis.api.core.Pair;
 import org.apache.activemq.artemis.api.core.SimpleString;
@@ -45,10 +37,17 @@ import org.apache.activemq.artemis.tests.integration.cluster.util.BackupSyncDela
 import org.apache.activemq.artemis.tests.integration.cluster.util.TestableServer;
 import org.apache.activemq.artemis.tests.util.TransportConfigurationUtils;
 import org.apache.activemq.artemis.utils.UUID;
-import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
 
+import java.io.File;
+import java.io.RandomAccessFile;
+import java.nio.ByteBuffer;
+import java.nio.channels.FileChannel;
+import java.util.HashSet;
+import java.util.Set;
+import java.util.concurrent.TimeUnit;
+
 public class BackupSyncJournalTest extends FailoverTestBase
 {
    protected static final int BACKUP_WAIT_TIME = 20;
@@ -77,36 +76,15 @@ public class BackupSyncJournalTest extends FailoverTestBase
       startBackupServer = false;
       super.setUp();
       setNumberOfMessages(defaultNMsgs);
-      locator = getServerLocator();
-      locator.setBlockOnNonDurableSend(true);
-      locator.setBlockOnDurableSend(true);
-      locator.setReconnectAttempts(-1);
+      locator = (ServerLocatorInternal) getServerLocator()
+              .setBlockOnNonDurableSend(true)
+              .setBlockOnDurableSend(true)
+              .setReconnectAttempts(-1);
       sessionFactory = createSessionFactoryAndWaitForTopology(locator, 1);
       syncDelay = new BackupSyncDelay(backupServer, liveServer);
 
    }
 
-   @Override
-   @After
-   public void tearDown() throws Exception
-   {
-      try
-      {
-         File dir = new File(backupServer.getServer()
-                                .getConfiguration()
-                                .getLargeMessagesDirectory());
-         deleteDirectory(dir);
-         dir = new File(liveServer.getServer()
-                           .getConfiguration()
-                           .getLargeMessagesDirectory());
-         deleteDirectory(dir);
-      }
-      finally
-      {
-         super.tearDown();
-      }
-   }
-
    @Test
    public void testNodeID() throws Exception
    {
@@ -338,7 +316,7 @@ public class BackupSyncJournalTest extends FailoverTestBase
       assertFalse("must NOT be a backup", liveServer.getServer().getHAPolicy().isBackup());
       adaptLiveConfigForReplicatedFailBack(liveServer);
       liveServer.start();
-      waitForServer(liveServer.getServer());
+      waitForServerToStart(liveServer.getServer());
       assertTrue("must have become a backup", liveServer.getServer().getHAPolicy().isBackup());
 
       assertTrue("Fail-back must initialize live!", liveServer.getServer().waitForActivation(15, TimeUnit.SECONDS));

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/328611fd/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/BackupSyncLargeMessageTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/BackupSyncLargeMessageTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/BackupSyncLargeMessageTest.java
index 386c306..ec38bf8 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/BackupSyncLargeMessageTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/BackupSyncLargeMessageTest.java
@@ -18,7 +18,13 @@ package org.apache.activemq.artemis.tests.integration.cluster.failover;
 
 import org.apache.activemq.artemis.api.core.ActiveMQBuffer;
 import org.apache.activemq.artemis.api.core.ActiveMQException;
-import org.apache.activemq.artemis.tests.util.ServiceTestBase;
+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.core.client.impl.ServerLocatorInternal;
+import org.apache.activemq.artemis.tests.util.ActiveMQTestBase;
+import org.junit.Assert;
 import org.junit.Test;
 
 import java.io.File;
@@ -29,15 +35,6 @@ import java.util.concurrent.Executors;
 import java.util.concurrent.TimeUnit;
 import java.util.concurrent.atomic.AtomicBoolean;
 
-import org.junit.Assert;
-
-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.ServerLocator;
-import org.apache.activemq.artemis.core.client.impl.ServerLocatorInternal;
-
 public class BackupSyncLargeMessageTest extends BackupSyncJournalTest
 {
 
@@ -50,9 +47,8 @@ public class BackupSyncLargeMessageTest extends BackupSyncJournalTest
    @Override
    protected ServerLocatorInternal getServerLocator() throws Exception
    {
-      ServerLocator locator = super.getServerLocator();
-      locator.setMinLargeMessageSize(MIN_LARGE_MESSAGE);
-      return (ServerLocatorInternal)locator;
+      return (ServerLocatorInternal) super.getServerLocator()
+              .setMinLargeMessageSize(MIN_LARGE_MESSAGE);
    }
 
    @Override
@@ -130,7 +126,7 @@ public class BackupSyncLargeMessageTest extends BackupSyncJournalTest
       final ClientProducer producer = session.createProducer(FailoverTestBase.ADDRESS);
       final ClientMessage message = session.createMessage(true);
       final int largeMessageSize = 1000 * MIN_LARGE_MESSAGE;
-      message.setBodyInputStream(ServiceTestBase.createFakeLargeStream(largeMessageSize));
+      message.setBodyInputStream(ActiveMQTestBase.createFakeLargeStream(largeMessageSize));
 
       final AtomicBoolean caughtException = new AtomicBoolean(false);
       final CountDownLatch latch = new CountDownLatch(1);
@@ -162,7 +158,7 @@ public class BackupSyncLargeMessageTest extends BackupSyncJournalTest
       Executors.defaultThreadFactory().newThread(r).start();
       waitForLatch(latch);
       startBackupFinishSyncing();
-      ServiceTestBase.waitForLatch(latch2);
+      ActiveMQTestBase.waitForLatch(latch2);
       crash(session);
       assertFalse("no exceptions while sending message", caughtException.get());
 
@@ -174,7 +170,7 @@ public class BackupSyncLargeMessageTest extends BackupSyncJournalTest
       for (int j = 0; j < largeMessageSize; j++)
       {
          Assert.assertTrue("large msg , expecting " + largeMessageSize + " bytes, got " + j, buffer.readable());
-         Assert.assertEquals("equal at " + j, ServiceTestBase.getSamplebyte(j), buffer.readByte());
+         Assert.assertEquals("equal at " + j, ActiveMQTestBase.getSamplebyte(j), buffer.readByte());
       }
       receiveMessages(consumer, 0, 20, true);
       assertNull("there should be no more messages!", consumer.receiveImmediate());

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/328611fd/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/BackupSyncPagingTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/BackupSyncPagingTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/BackupSyncPagingTest.java
index c5619a3..a361eb5 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/BackupSyncPagingTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/BackupSyncPagingTest.java
@@ -44,10 +44,10 @@ public class BackupSyncPagingTest extends BackupSyncJournalTest
             final NodeManager nodeManager, int id)
    {
       Map<String, AddressSettings> conf = new HashMap<String, AddressSettings>();
-      AddressSettings as = new AddressSettings();
-      as.setMaxSizeBytes(PAGE_MAX);
-      as.setPageSizeBytes(PAGE_SIZE);
-      as.setAddressFullMessagePolicy(AddressFullMessagePolicy.PAGE);
+      AddressSettings as = new AddressSettings()
+              .setMaxSizeBytes(PAGE_MAX)
+              .setPageSizeBytes(PAGE_SIZE)
+              .setAddressFullMessagePolicy(AddressFullMessagePolicy.PAGE);
       conf.put(ADDRESS.toString(), as);
       return createInVMFailoverServer(realFiles, configuration, PAGE_SIZE, PAGE_MAX, conf, nodeManager, id);
    }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/328611fd/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/FailBackAutoTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/FailBackAutoTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/FailBackAutoTest.java
index 4d781c6..66ef66f 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/FailBackAutoTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/FailBackAutoTest.java
@@ -238,10 +238,10 @@ public class FailBackAutoTest extends FailoverTestBase
 
    private void createSessionFactory() throws Exception
    {
-      locator.setBlockOnNonDurableSend(true);
-      locator.setBlockOnDurableSend(true);
-      locator.setFailoverOnInitialConnection(true); // unnecessary?
-      locator.setReconnectAttempts(-1);
+      locator.setBlockOnNonDurableSend(true)
+              .setBlockOnDurableSend(true)
+              .setFailoverOnInitialConnection(true) // unnecessary?
+              .setReconnectAttempts(-1);
       sf = createSessionFactoryAndWaitForTopology(locator, 2);
    }
 
@@ -260,10 +260,9 @@ public class FailBackAutoTest extends FailoverTestBase
       TransportConfiguration liveConnector = getConnectorTransportConfiguration(true);
       TransportConfiguration backupConnector = getConnectorTransportConfiguration(false);
 
-      backupConfig = super.createDefaultConfig()
+      backupConfig = super.createDefaultInVMConfig()
          .clearAcceptorConfigurations()
          .addAcceptorConfiguration(getAcceptorTransportConfiguration(false))
-         .setSecurityEnabled(false)
          .setHAPolicyConfiguration(new SharedStoreSlavePolicyConfiguration()
                                       .setFailbackDelay(1000)
                                       .setRestartBackup(true))
@@ -273,10 +272,9 @@ public class FailBackAutoTest extends FailoverTestBase
 
       backupServer = createTestableServer(backupConfig);
 
-      liveConfig = super.createDefaultConfig()
+      liveConfig = super.createDefaultInVMConfig()
          .clearAcceptorConfigurations()
          .addAcceptorConfiguration(getAcceptorTransportConfiguration(true))
-         .setSecurityEnabled(false)
          .setHAPolicyConfiguration(new SharedStoreMasterPolicyConfiguration()
                                       .setFailbackDelay(100))
          .addClusterConfiguration(basicClusterConnectionConfig(liveConnector.getName(), backupConnector.getName()))

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/328611fd/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/FailBackManualTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/FailBackManualTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/FailBackManualTest.java
index 9ac925e..203e25e 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/FailBackManualTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/FailBackManualTest.java
@@ -52,10 +52,11 @@ public class FailBackManualTest extends FailoverTestBase
    @Test
    public void testNoAutoFailback() throws Exception
    {
-      locator.setBlockOnNonDurableSend(true);
-      locator.setBlockOnDurableSend(true);
-      locator.setFailoverOnInitialConnection(true);
-      locator.setReconnectAttempts(-1);
+      locator.setBlockOnNonDurableSend(true)
+              .setBlockOnDurableSend(true)
+              .setFailoverOnInitialConnection(true)
+              .setReconnectAttempts(-1);
+
       ClientSessionFactoryInternal sf = createSessionFactoryAndWaitForTopology(locator, 2);
 
       ClientSession session = sendAndConsume(sf, true);
@@ -93,7 +94,7 @@ public class FailBackManualTest extends FailoverTestBase
 
       backupServer.crash();
 
-      waitForServer(liveServer.getServer());
+      waitForServerToStart(liveServer.getServer());
 
       assertTrue(liveServer.isStarted());
 
@@ -112,10 +113,9 @@ public class FailBackManualTest extends FailoverTestBase
       TransportConfiguration liveConnector = getConnectorTransportConfiguration(true);
       TransportConfiguration backupConnector = getConnectorTransportConfiguration(false);
 
-      backupConfig = super.createDefaultConfig()
+      backupConfig = super.createDefaultInVMConfig()
          .clearAcceptorConfigurations()
          .addAcceptorConfiguration(getAcceptorTransportConfiguration(false))
-         .setSecurityEnabled(false)
          .setHAPolicyConfiguration(new SharedStoreSlavePolicyConfiguration()
                                       .setAllowFailBack(false))
          .addConnectorConfiguration(liveConnector.getName(), liveConnector)
@@ -124,10 +124,9 @@ public class FailBackManualTest extends FailoverTestBase
 
       backupServer = createTestableServer(backupConfig);
 
-      liveConfig = super.createDefaultConfig()
+      liveConfig = super.createDefaultInVMConfig()
          .clearAcceptorConfigurations()
          .addAcceptorConfiguration(getAcceptorTransportConfiguration(true))
-         .setSecurityEnabled(false)
          .setHAPolicyConfiguration(new SharedStoreMasterPolicyConfiguration())
          .addConnectorConfiguration(liveConnector.getName(), liveConnector)
          .addConnectorConfiguration(backupConnector.getName(), backupConnector)

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/328611fd/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/FailoverListenerTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/FailoverListenerTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/FailoverListenerTest.java
index 3e30ff9..b5850b4 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/FailoverListenerTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/FailoverListenerTest.java
@@ -150,10 +150,10 @@ public class FailoverListenerTest extends FailoverTestBase
    @Test
    public void testFailoverFailed() throws Exception
    {
-      locator.setBlockOnNonDurableSend(true);
-      locator.setBlockOnDurableSend(true);
-      locator.setFailoverOnInitialConnection(true); // unnecessary?
-      locator.setReconnectAttempts(1);
+      locator.setBlockOnNonDurableSend(true)
+              .setBlockOnDurableSend(true)
+              .setFailoverOnInitialConnection(true) // unnecessary?
+              .setReconnectAttempts(1);
       sf = createSessionFactoryAndWaitForTopology(locator, 2);
 
       //make sure no backup server is running
@@ -179,10 +179,10 @@ public class FailoverListenerTest extends FailoverTestBase
 
    private void createSessionFactory(int members) throws Exception
    {
-      locator.setBlockOnNonDurableSend(true);
-      locator.setBlockOnDurableSend(true);
-      locator.setFailoverOnInitialConnection(true); // unnecessary?
-      locator.setReconnectAttempts(-1);
+      locator.setBlockOnNonDurableSend(true)
+              .setBlockOnDurableSend(true)
+              .setFailoverOnInitialConnection(true) // unnecessary?
+              .setReconnectAttempts(-1);
       sf = createSessionFactoryAndWaitForTopology(locator, members);
    }
 
@@ -200,10 +200,9 @@ public class FailoverListenerTest extends FailoverTestBase
       TransportConfiguration liveConnector = getConnectorTransportConfiguration(true);
       TransportConfiguration backupConnector = getConnectorTransportConfiguration(false);
 
-      backupConfig = super.createDefaultConfig()
+      backupConfig = super.createDefaultInVMConfig()
          .clearAcceptorConfigurations()
          .addAcceptorConfiguration(getAcceptorTransportConfiguration(false))
-         .setSecurityEnabled(false)
          .setHAPolicyConfiguration(new SharedStoreSlavePolicyConfiguration()
                                       .setFailbackDelay(1000))
          .addConnectorConfiguration(liveConnector.getName(), liveConnector)
@@ -212,10 +211,9 @@ public class FailoverListenerTest extends FailoverTestBase
 
       backupServer = createTestableServer(backupConfig);
 
-      liveConfig = super.createDefaultConfig()
+      liveConfig = super.createDefaultInVMConfig()
          .clearAcceptorConfigurations()
          .addAcceptorConfiguration(getAcceptorTransportConfiguration(true))
-         .setSecurityEnabled(false)
          .setHAPolicyConfiguration(new SharedStoreMasterPolicyConfiguration()
                                       .setFailbackDelay(1000))
          .addClusterConfiguration(basicClusterConnectionConfig(liveConnector.getName(), backupConnector.getName()))

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/328611fd/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/FailoverOnFlowControlTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/FailoverOnFlowControlTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/FailoverOnFlowControlTest.java
index 70b0173..523dafa 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/FailoverOnFlowControlTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/FailoverOnFlowControlTest.java
@@ -45,12 +45,12 @@ public class FailoverOnFlowControlTest extends FailoverTestBase
    @Test
    public void testOverflowSend() throws Exception
    {
-      ServerLocator locator = getServerLocator();
-      locator.setBlockOnNonDurableSend(true);
-      locator.setBlockOnDurableSend(true);
-      locator.setReconnectAttempts(-1);
-      locator.setProducerWindowSize(1000);
-      locator.setRetryInterval(123);
+      ServerLocator locator = getServerLocator()
+              .setBlockOnNonDurableSend(true)
+              .setBlockOnDurableSend(true)
+              .setReconnectAttempts(-1)
+              .setProducerWindowSize(1000)
+              .setRetryInterval(123);
       final ArrayList<ClientSession> sessionList = new ArrayList<ClientSession>();
       Interceptor interceptorClient = new Interceptor()
       {
@@ -126,10 +126,9 @@ public class FailoverOnFlowControlTest extends FailoverTestBase
    @Override
    protected ServerLocatorInternal getServerLocator() throws Exception
    {
-      ServerLocatorInternal locator = super.getServerLocator();
-      locator.setMinLargeMessageSize(1024 * 1024);
-      locator.setProducerWindowSize(10 * 1024);
-      return locator;
+      return (ServerLocatorInternal) super.getServerLocator()
+              .setMinLargeMessageSize(1024 * 1024)
+              .setProducerWindowSize(10 * 1024);
    }
 
    @Override

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/328611fd/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/FailoverTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/FailoverTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/FailoverTest.java
index c27760f..777a01f 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/FailoverTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/FailoverTest.java
@@ -111,11 +111,12 @@ public class FailoverTest extends FailoverTestBase
    @Test
    public void testTimeoutOnFailover() throws Exception
    {
-      locator.setCallTimeout(1000);
-      locator.setBlockOnNonDurableSend(true);
-      locator.setBlockOnDurableSend(true);
-      locator.setAckBatchSize(0);
-      locator.setReconnectAttempts(-1);
+      locator.setCallTimeout(1000)
+              .setBlockOnNonDurableSend(true)
+              .setBlockOnDurableSend(true)
+              .setAckBatchSize(0)
+              .setReconnectAttempts(-1);
+
       ((InVMNodeManager) nodeManager).failoverPause = 500;
 
       ClientSessionFactoryInternal sf1 = (ClientSessionFactoryInternal) createSessionFactory(locator);
@@ -192,13 +193,14 @@ public class FailoverTest extends FailoverTestBase
    @Test
    public void testTimeoutOnFailoverConsume() throws Exception
    {
-      locator.setCallTimeout(5000);
-      locator.setBlockOnNonDurableSend(true);
-      locator.setBlockOnDurableSend(true);
-      locator.setAckBatchSize(0);
-      locator.setBlockOnAcknowledge(true);
-      locator.setReconnectAttempts(-1);
-      locator.setAckBatchSize(0);
+      locator.setCallTimeout(5000)
+              .setBlockOnNonDurableSend(true)
+              .setBlockOnDurableSend(true)
+              .setAckBatchSize(0)
+              .setBlockOnAcknowledge(true)
+              .setReconnectAttempts(-1)
+              .setAckBatchSize(0);
+
       ((InVMNodeManager) nodeManager).failoverPause = 5000L;
 
       ClientSessionFactoryInternal sf1 = (ClientSessionFactoryInternal) createSessionFactory(locator);
@@ -266,14 +268,15 @@ public class FailoverTest extends FailoverTestBase
    @Test
    public void testTimeoutOnFailoverConsumeBlocked() throws Exception
    {
-      locator.setCallTimeout(5000);
-      locator.setBlockOnNonDurableSend(true);
-      locator.setConsumerWindowSize(0);
-      locator.setBlockOnDurableSend(true);
-      locator.setAckBatchSize(0);
-      locator.setBlockOnAcknowledge(true);
-      locator.setReconnectAttempts(-1);
-      locator.setAckBatchSize(0);
+      locator.setCallTimeout(5000)
+              .setBlockOnNonDurableSend(true)
+              .setConsumerWindowSize(0)
+              .setBlockOnDurableSend(true)
+              .setAckBatchSize(0)
+              .setBlockOnAcknowledge(true)
+              .setReconnectAttempts(-1)
+              .setAckBatchSize(0);
+
       ((InVMNodeManager) nodeManager).failoverPause = 5000L;
 
       ClientSessionFactoryInternal sf1 = (ClientSessionFactoryInternal) createSessionFactory(locator);
@@ -387,11 +390,12 @@ public class FailoverTest extends FailoverTestBase
    @Test
    public void testTimeoutOnFailoverTransactionCommit() throws Exception
    {
-      locator.setCallTimeout(2000);
-      locator.setBlockOnNonDurableSend(true);
-      locator.setBlockOnDurableSend(true);
-      locator.setAckBatchSize(0);
-      locator.setReconnectAttempts(-1);
+      locator.setCallTimeout(2000)
+              .setBlockOnNonDurableSend(true)
+              .setBlockOnDurableSend(true)
+              .setAckBatchSize(0)
+              .setReconnectAttempts(-1);
+
       ((InVMNodeManager) nodeManager).failoverPause = 5000L;
 
       ClientSessionFactoryInternal sf1 = (ClientSessionFactoryInternal) createSessionFactory(locator);
@@ -442,11 +446,12 @@ public class FailoverTest extends FailoverTestBase
    @Test
    public void testTimeoutOnFailoverTransactionRollback() throws Exception
    {
-      locator.setCallTimeout(2000);
-      locator.setBlockOnNonDurableSend(true);
-      locator.setBlockOnDurableSend(true);
-      locator.setAckBatchSize(0);
-      locator.setReconnectAttempts(-1);
+      locator.setCallTimeout(2000)
+              .setBlockOnNonDurableSend(true)
+              .setBlockOnDurableSend(true)
+              .setAckBatchSize(0)
+              .setReconnectAttempts(-1);
+
       ((InVMNodeManager) nodeManager).failoverPause = 5000L;
 
       ClientSessionFactoryInternal sf1 = (ClientSessionFactoryInternal) createSessionFactory(locator);
@@ -499,10 +504,10 @@ public class FailoverTest extends FailoverTestBase
    @Test
    public void testNonTransactedWithZeroConsumerWindowSize() throws Exception
    {
-      locator.setBlockOnNonDurableSend(true);
-      locator.setBlockOnDurableSend(true);
-      locator.setAckBatchSize(0);
-      locator.setReconnectAttempts(-1);
+      locator.setBlockOnNonDurableSend(true)
+              .setBlockOnDurableSend(true)
+              .setAckBatchSize(0)
+              .setReconnectAttempts(-1);
 
       createClientSessionFactory();
 
@@ -773,9 +778,9 @@ public class FailoverTest extends FailoverTestBase
 
    protected void createSessionFactory() throws Exception
    {
-      locator.setBlockOnNonDurableSend(true);
-      locator.setBlockOnDurableSend(true);
-      locator.setReconnectAttempts(-1);
+      locator.setBlockOnNonDurableSend(true)
+              .setBlockOnDurableSend(true)
+              .setReconnectAttempts(-1);
 
       sf = createSessionFactoryAndWaitForTopology(locator, 2);
    }
@@ -865,10 +870,10 @@ public class FailoverTest extends FailoverTestBase
    @Test
    public void testFailoverOnInitialConnection() throws Exception
    {
-      locator.setBlockOnNonDurableSend(true);
-      locator.setBlockOnDurableSend(true);
-      locator.setFailoverOnInitialConnection(true);
-      locator.setReconnectAttempts(-1);
+      locator.setBlockOnNonDurableSend(true)
+              .setBlockOnDurableSend(true)
+              .setFailoverOnInitialConnection(true)
+              .setReconnectAttempts(-1);
 
       sf = createSessionFactoryAndWaitForTopology(locator, 2);
 
@@ -1542,9 +1547,9 @@ public class FailoverTest extends FailoverTestBase
    public void testCreateNewFactoryAfterFailover() throws Exception
    {
       this.disableCheckThread();
-      locator.setBlockOnNonDurableSend(true);
-      locator.setBlockOnDurableSend(true);
-      locator.setFailoverOnInitialConnection(true);
+      locator.setBlockOnNonDurableSend(true)
+              .setBlockOnDurableSend(true)
+              .setFailoverOnInitialConnection(true);
       sf = createSessionFactoryAndWaitForTopology(locator, 2);
 
       ClientSession session = sendAndConsume(sf, true);
@@ -1757,10 +1762,11 @@ public class FailoverTest extends FailoverTestBase
    @Test
    public void testFailThenReceiveMoreMessagesAfterFailover2() throws Exception
    {
-      locator.setBlockOnNonDurableSend(true);
-      locator.setBlockOnDurableSend(true);
-      locator.setBlockOnAcknowledge(true);
-      locator.setReconnectAttempts(-1);
+      locator.setBlockOnNonDurableSend(true)
+              .setBlockOnDurableSend(true)
+              .setBlockOnAcknowledge(true)
+              .setReconnectAttempts(-1);
+
       sf = createSessionFactoryAndWaitForTopology(locator, 2);
 
       ClientSession session = createSession(sf, true, true, 0);
@@ -1818,10 +1824,11 @@ public class FailoverTest extends FailoverTestBase
 
    private void doSimpleSendAfterFailover(final boolean durable, final boolean temporary) throws Exception
    {
-      locator.setBlockOnNonDurableSend(true);
-      locator.setBlockOnDurableSend(true);
-      locator.setBlockOnAcknowledge(true);
-      locator.setReconnectAttempts(-1);
+      locator.setBlockOnNonDurableSend(true)
+              .setBlockOnDurableSend(true)
+              .setBlockOnAcknowledge(true)
+              .setReconnectAttempts(-1);
+
       sf = createSessionFactoryAndWaitForTopology(locator, 2);
 
       ClientSession session = createSession(sf, true, true, 0);
@@ -1851,10 +1858,11 @@ public class FailoverTest extends FailoverTestBase
    @Test
    public void testForceBlockingReturn() throws Exception
    {
-      locator.setBlockOnNonDurableSend(true);
-      locator.setBlockOnDurableSend(true);
-      locator.setBlockOnAcknowledge(true);
-      locator.setReconnectAttempts(-1);
+      locator.setBlockOnNonDurableSend(true)
+              .setBlockOnDurableSend(true)
+              .setBlockOnAcknowledge(true)
+              .setReconnectAttempts(-1);
+
       createClientSessionFactory();
 
       // Add an interceptor to delay the send method so we can get time to cause failover before it returns
@@ -1910,11 +1918,10 @@ public class FailoverTest extends FailoverTestBase
    @Test
    public void testCommitOccurredUnblockedAndResendNoDuplicates() throws Exception
    {
-      locator.setBlockOnNonDurableSend(true);
-      locator.setBlockOnDurableSend(true);
-      locator.setReconnectAttempts(-1);
-
-      locator.setBlockOnAcknowledge(true);
+      locator.setBlockOnNonDurableSend(true)
+              .setBlockOnDurableSend(true)
+              .setReconnectAttempts(-1)
+              .setBlockOnAcknowledge(true);
 
       sf = createSessionFactoryAndWaitForTopology(locator, 2);
 
@@ -2069,10 +2076,11 @@ public class FailoverTest extends FailoverTestBase
    @Test
    public void testCommitDidNotOccurUnblockedAndResend() throws Exception
    {
-      locator.setBlockOnNonDurableSend(true);
-      locator.setBlockOnDurableSend(true);
-      locator.setBlockOnAcknowledge(true);
-      locator.setReconnectAttempts(-1);
+      locator.setBlockOnNonDurableSend(true)
+              .setBlockOnDurableSend(true)
+              .setBlockOnAcknowledge(true)
+              .setReconnectAttempts(-1);
+
       sf = createSessionFactoryAndWaitForTopology(locator, 2);
 
       final ClientSession session = createSession(sf, false, false);
@@ -2292,10 +2300,11 @@ public class FailoverTest extends FailoverTestBase
    @Test
    public void testLiveAndBackupBackupComesBackNewFactory() throws Exception
    {
-      locator.setBlockOnNonDurableSend(true);
-      locator.setBlockOnDurableSend(true);
-      locator.setFailoverOnInitialConnection(true);
-      locator.setReconnectAttempts(-1);
+      locator.setBlockOnNonDurableSend(true)
+              .setBlockOnDurableSend(true)
+              .setFailoverOnInitialConnection(true)
+              .setReconnectAttempts(-1);
+
       sf = createSessionFactoryAndWaitForTopology(locator, 2);
 
       ClientSession session = sendAndConsume(sf, true);


Mime
View raw message