activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbert...@apache.org
Subject [1/3] activemq-artemis git commit: ARTEMIS-139 data.folder related to artemis
Date Wed, 17 Jun 2015 20:17:50 GMT
Repository: activemq-artemis
Updated Branches:
  refs/heads/master 7de88ef87 -> a58ccde8e


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/43889235/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 c550797..51acdcb 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
@@ -16,6 +16,7 @@
  */
 package org.apache.activemq.artemis.tests.integration.cluster;
 
+import java.io.File;
 import java.util.ArrayList;
 import java.util.List;
 
@@ -32,7 +33,7 @@ public class RealNodeManagerTest extends NodeManagerTest
    @Test
    public void testId() throws Exception
    {
-      NodeManager nodeManager = new FileLockNodeManager(getTemporaryDir(), false);
+      NodeManager nodeManager = new FileLockNodeManager(new File(getTemporaryDir()), false);
       nodeManager.start();
       UUID id1 = nodeManager.getUUID();
       nodeManager.stop();

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/43889235/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 5fea52d..e88a4bf 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/bridge/BridgeTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/bridge/BridgeTest.java
@@ -16,6 +16,18 @@
  */
 package org.apache.activemq.artemis.tests.integration.cluster.bridge;
 
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.Semaphore;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.atomic.AtomicInteger;
+
 import org.apache.activemq.artemis.api.core.ActiveMQBuffer;
 import org.apache.activemq.artemis.api.core.ActiveMQException;
 import org.apache.activemq.artemis.api.core.Interceptor;
@@ -67,18 +79,6 @@ import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.junit.runners.Parameterized;
 
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.Semaphore;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.atomic.AtomicInteger;
-
 @RunWith(value = Parameterized.class)
 public class BridgeTest extends ActiveMQTestBase
 {
@@ -1926,7 +1926,7 @@ public class BridgeTest extends ActiveMQTestBase
    protected Map<Long, AtomicInteger> loadQueues(ActiveMQServer serverToInvestigate) throws Exception
    {
       SequentialFileFactory messagesFF = new NIOSequentialFileFactory(serverToInvestigate.getConfiguration()
-                                                                              .getJournalDirectory());
+                                                                              .getJournalLocation());
 
       JournalImpl messagesJournal = new JournalImpl(serverToInvestigate.getConfiguration().getJournalFileSize(),
                                                     serverToInvestigate.getConfiguration().getJournalMinFiles(),

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/43889235/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 edf6bf9..f1e3c06 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/distribution/ClusterTestBase.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/distribution/ClusterTestBase.java
@@ -16,6 +16,22 @@
  */
 package org.apache.activemq.artemis.tests.integration.cluster.distribution;
 
+import java.io.File;
+import java.io.PrintWriter;
+import java.io.StringWriter;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.atomic.AtomicInteger;
+
 import org.apache.activemq.artemis.api.config.ActiveMQDefaultConfiguration;
 import org.apache.activemq.artemis.api.core.ActiveMQException;
 import org.apache.activemq.artemis.api.core.BroadcastGroupConfiguration;
@@ -68,21 +84,6 @@ import org.junit.After;
 import org.junit.Assert;
 import org.junit.Before;
 
-import java.io.PrintWriter;
-import java.io.StringWriter;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.atomic.AtomicInteger;
-
 public abstract class ClusterTestBase extends ActiveMQTestBase
 {
    private static final IntegrationTestLogger log = IntegrationTestLogger.LOGGER;
@@ -152,7 +153,7 @@ public abstract class ClusterTestBase extends ActiveMQTestBase
 
       for (int i = 0, nodeManagersLength = nodeManagers.length; i < nodeManagersLength; i++)
       {
-         nodeManagers[i] = new InVMNodeManager(isSharedStore(), getJournalDir(i, true));
+         nodeManagers[i] = new InVMNodeManager(isSharedStore(), new File(getJournalDir(i, true)));
       }
 
       locators = new ServerLocator[ClusterTestBase.MAX_SERVERS];
@@ -1717,7 +1718,7 @@ public abstract class ClusterTestBase extends ActiveMQTestBase
     * backup case.
     * <br>
     * Use
-    * {@link #setupClusterConnectionWithBackups(String, String, boolean, int, boolean, int, int[])}
+    * {@link #setupClusterConnectionWithBackups(String, String, org.apache.activemq.artemis.core.server.cluster.impl.MessageLoadBalancingType, int, boolean, int, int[])}
     * to add it.
     *
     * @param node
@@ -2169,11 +2170,6 @@ public abstract class ClusterTestBase extends ActiveMQTestBase
       clusterConfs.add(clusterConf);
    }
 
-   /**
-    * XXX waitForPrevious actually masks what can be considered a bug: that even controlling for
-    * {@link org.apache.activemq.artemis.core.server.ActiveMQServer#waitForInitialization} we still need to wait between starting a shared
-    * store backup and its live.
-    */
    protected void startServers(final int... nodes) throws Exception
    {
       for (int node : nodes)

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/43889235/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 3b749bd..a4c9699 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,6 +16,14 @@
  */
 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;
@@ -40,14 +48,6 @@ import org.apache.activemq.artemis.utils.UUID;
 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;
@@ -227,9 +227,9 @@ public class BackupSyncJournalTest extends FailoverTestBase
       {
          System.out.println("\n\n BINDINGS JOURNAL\n\n");
          Configuration config = server.getServer().getConfiguration();
-         DescribeJournal.describeBindingsJournal(config.getBindingsDirectory());
+         DescribeJournal.describeBindingsJournal(config.getBindingsLocation());
          System.out.println("\n\n MESSAGES JOURNAL\n\n");
-         DescribeJournal.describeMessagesJournal(config.getJournalDirectory());
+         DescribeJournal.describeMessagesJournal(config.getJournalLocation());
       }
       catch (Exception ignored)
       {

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/43889235/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/FailoverTestBase.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/FailoverTestBase.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/FailoverTestBase.java
index 9a7159e..fa23f7e 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/FailoverTestBase.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/FailoverTestBase.java
@@ -16,6 +16,13 @@
  */
 package org.apache.activemq.artemis.tests.integration.cluster.failover;
 
+import java.io.IOException;
+import java.net.ServerSocket;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.TimeUnit;
+
 import org.apache.activemq.artemis.api.core.ActiveMQBuffer;
 import org.apache.activemq.artemis.api.core.SimpleString;
 import org.apache.activemq.artemis.api.core.TransportConfiguration;
@@ -40,19 +47,12 @@ import org.apache.activemq.artemis.core.server.impl.ActiveMQServerImpl;
 import org.apache.activemq.artemis.core.server.impl.InVMNodeManager;
 import org.apache.activemq.artemis.tests.integration.cluster.util.SameProcessActiveMQServer;
 import org.apache.activemq.artemis.tests.integration.cluster.util.TestableServer;
-import org.apache.activemq.artemis.tests.util.ReplicatedBackupUtils;
 import org.apache.activemq.artemis.tests.util.ActiveMQTestBase;
+import org.apache.activemq.artemis.tests.util.ReplicatedBackupUtils;
 import org.junit.After;
 import org.junit.Assert;
 import org.junit.Before;
 
-import java.io.IOException;
-import java.net.ServerSocket;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.TimeUnit;
-
 public abstract class FailoverTestBase extends ActiveMQTestBase
 {
    // Constants -----------------------------------------------------
@@ -213,7 +213,7 @@ public abstract class FailoverTestBase extends ActiveMQTestBase
          .setSecurityEnabled(false);
 
       setupHAPolicyConfiguration();
-      nodeManager = new InVMNodeManager(true, backupConfig.getJournalDirectory());
+      nodeManager = new InVMNodeManager(true, backupConfig.getJournalLocation());
 
       backupServer = createTestableServer(backupConfig);
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/43889235/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/AIOImportExportTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/AIOImportExportTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/AIOImportExportTest.java
index 2dddab9e..3848dbf 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/AIOImportExportTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/AIOImportExportTest.java
@@ -40,6 +40,6 @@ public class AIOImportExportTest extends NIOImportExportTest
 
       file.mkdir();
 
-      return new AIOSequentialFileFactory(getTestDir());
+      return new AIOSequentialFileFactory(getTestDirfile());
    }
 }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/43889235/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/AIOJournalCompactTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/AIOJournalCompactTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/AIOJournalCompactTest.java
index 65739d0..39972e7 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/AIOJournalCompactTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/AIOJournalCompactTest.java
@@ -41,7 +41,7 @@ public class AIOJournalCompactTest extends NIOJournalCompactTest
 
       file.mkdir();
 
-      return new AIOSequentialFileFactory(getTestDir(),
+      return new AIOSequentialFileFactory(getTestDirfile(),
                                           JournalConstants.DEFAULT_JOURNAL_BUFFER_SIZE_AIO,
                                           100000,
                                           false);

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/43889235/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/AIOJournalImplTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/AIOJournalImplTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/AIOJournalImplTest.java
index 6730c64..acbaac4 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/AIOJournalImplTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/AIOJournalImplTest.java
@@ -66,7 +66,7 @@ public class AIOJournalImplTest extends JournalImplTestUnit
 
       file.mkdir();
 
-      return new AIOSequentialFileFactory(getTestDir(),
+      return new AIOSequentialFileFactory(getTestDirfile(),
             JournalConstants.DEFAULT_JOURNAL_BUFFER_SIZE_AIO, 1000000,
             false);
    }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/43889235/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/AIOSequentialFileFactoryTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/AIOSequentialFileFactoryTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/AIOSequentialFileFactoryTest.java
index 5d2d293..072c820 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/AIOSequentialFileFactoryTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/AIOSequentialFileFactoryTest.java
@@ -15,6 +15,7 @@
  * limitations under the License.
  */
 package org.apache.activemq.artemis.tests.integration.journal;
+import java.io.File;
 import java.nio.ByteBuffer;
 
 import org.apache.activemq.artemis.tests.unit.core.journal.impl.SequentialFileFactoryTestBase;
@@ -37,7 +38,7 @@ public class AIOSequentialFileFactoryTest extends SequentialFileFactoryTestBase
    @Override
    protected SequentialFileFactory createFactory(String folder)
    {
-      return new AIOSequentialFileFactory(folder);
+      return new AIOSequentialFileFactory(new File(folder));
    }
 
    @Test

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/43889235/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/JournalPerfTuneTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/JournalPerfTuneTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/JournalPerfTuneTest.java
deleted file mode 100644
index 70b0cde..0000000
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/JournalPerfTuneTest.java
+++ /dev/null
@@ -1,238 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * 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
- *
- * 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.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.activemq.artemis.tests.integration.journal;
-import java.util.List;
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.atomic.AtomicLong;
-
-import org.apache.activemq.artemis.api.core.ActiveMQBuffer;
-import org.apache.activemq.artemis.tests.integration.IntegrationTestLogger;
-import org.apache.activemq.artemis.tests.util.ActiveMQTestBase;
-import org.apache.activemq.artemis.core.journal.EncodingSupport;
-import org.apache.activemq.artemis.core.journal.IOCompletion;
-import org.apache.activemq.artemis.core.journal.Journal;
-import org.apache.activemq.artemis.core.journal.LoaderCallback;
-import org.apache.activemq.artemis.core.journal.PreparedTransactionInfo;
-import org.apache.activemq.artemis.core.journal.RecordInfo;
-import org.apache.activemq.artemis.core.journal.SequentialFileFactory;
-import org.apache.activemq.artemis.core.journal.impl.AIOSequentialFileFactory;
-import org.apache.activemq.artemis.core.journal.impl.JournalImpl;
-import org.apache.activemq.artemis.utils.DataConstants;
-import org.junit.Before;
-import org.junit.Ignore;
-import org.junit.Test;
-
-@Ignore
-public class JournalPerfTuneTest extends ActiveMQTestBase
-{
-   private static final IntegrationTestLogger log = IntegrationTestLogger.LOGGER;
-
-   private Journal journal;
-
-   static final class LoaderCB implements LoaderCallback
-   {
-
-      public void addPreparedTransaction(PreparedTransactionInfo preparedTransaction)
-      {
-         // no-op
-      }
-
-      public void addRecord(RecordInfo info)
-      {
-         // no-op
-      }
-
-      public void deleteRecord(long id)
-      {
-         // no-op
-      }
-
-      public void updateRecord(RecordInfo info)
-      {
-         // no-op
-      }
-
-      public void failedTransaction(long transactionID, List<RecordInfo> records, List<RecordInfo> recordsToDelete)
-      {
-         // no-op
-      }
-
-   }
-
-   @Override
-   @Before
-   public void setUp() throws Exception
-   {
-      super.setUp();
-
-      final int fileSize = 1024 * 1024 * 10;
-      final int minFiles = 10;
-      final int compactMinFiles = 20;
-      final int compactPercentage = 30;
-      final String filePrefix = "data";
-      final String extension = "amq";
-      final int maxIO = 500;
-
-      final String journalDir = getTestDir();
-      final int bufferSize = 490 * 1024;
-      final int bufferTimeout = (int)(1000000000d / 2000);
-      final boolean logRates = true;
-
-      recreateDirectory(journalDir);
-
-      SequentialFileFactory fileFactory = new AIOSequentialFileFactory(journalDir, bufferSize, bufferTimeout, logRates);
-
-      journal = new JournalImpl(fileSize,
-                                minFiles,
-                                compactMinFiles,
-                                compactPercentage,
-                                fileFactory,
-                                filePrefix,
-                                extension,
-                                maxIO);
-      addActiveMQComponent(journal);
-      journal.start();
-
-      journal.load(new LoaderCB());
-   }
-
-   static final class TestCallback implements IOCompletion
-   {
-      private final CountDownLatch latch;
-
-      TestCallback(final int counts)
-      {
-         this.latch = new CountDownLatch(counts);
-      }
-
-      public void await() throws Exception
-      {
-         waitForLatch(latch);
-      }
-
-      public void storeLineUp()
-      {
-      }
-
-      public void done()
-      {
-         latch.countDown();
-
-         log.info(latch.getCount());
-      }
-
-      public void onError(int errorCode, String errorMessage)
-      {
-      }
-
-   }
-
-   @Test
-   public void test1() throws Exception
-   {
-      final int itersPerThread = 10000000;
-
-      final int numThreads = 1;
-
-      this.callback = new TestCallback(2 * itersPerThread * numThreads);
-
-      Worker[] workers = new Worker[numThreads];
-
-      for (int i = 0; i < numThreads; i++)
-      {
-         workers[i] = new Worker(itersPerThread);
-
-         workers[i].start();
-      }
-
-      for (int i = 0; i < numThreads; i++)
-      {
-         workers[i].join();
-      }
-
-      callback.await();
-   }
-
-   private final AtomicLong idGen = new AtomicLong(0);
-
-   private TestCallback callback;
-
-   class Worker extends Thread
-   {
-      final int iters;
-
-      Worker(final int iters)
-      {
-         this.iters = iters;
-      }
-
-      @Override
-      public void run()
-      {
-         try
-         {
-            Record record = new Record(new byte[1024]);
-
-            for (int i = 0; i < iters; i++)
-            {
-               long id = idGen.getAndIncrement();
-
-               journal.appendAddRecord(id, (byte)0, record, true, callback);
-
-               journal.appendDeleteRecord(id, true, callback);
-
-               // log.info("did " + i);
-            }
-         }
-         catch (Exception e)
-         {
-            log.error("Failed", e);
-         }
-      }
-   }
-
-   static class Record implements EncodingSupport
-   {
-      private byte[] bytes;
-
-      Record(byte[] bytes)
-      {
-         this.bytes = bytes;
-      }
-
-      public void decode(ActiveMQBuffer buffer)
-      {
-         int length = buffer.readInt();
-
-         bytes = new byte[length];
-
-         buffer.readBytes(bytes);
-      }
-
-      public void encode(ActiveMQBuffer buffer)
-      {
-         buffer.writeInt(bytes.length);
-
-         buffer.writeBytes(bytes);
-      }
-
-      public int getEncodeSize()
-      {
-         return DataConstants.SIZE_INT + bytes.length;
-      }
-   }
-}

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/43889235/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/NIOBufferedJournalCompactTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/NIOBufferedJournalCompactTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/NIOBufferedJournalCompactTest.java
index b3bf93b..1a69dab 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/NIOBufferedJournalCompactTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/NIOBufferedJournalCompactTest.java
@@ -34,7 +34,7 @@ public class NIOBufferedJournalCompactTest extends NIOJournalCompactTest
 
       file.mkdir();
 
-      return new NIOSequentialFileFactory(getTestDir(), true);
+      return new NIOSequentialFileFactory(getTestDirfile(), true);
    }
 
 }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/43889235/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/NIOImportExportTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/NIOImportExportTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/NIOImportExportTest.java
index 2359410..daeb0a2 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/NIOImportExportTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/NIOImportExportTest.java
@@ -16,6 +16,8 @@
  */
 package org.apache.activemq.artemis.tests.integration.journal;
 
+import java.io.File;
+
 import org.apache.activemq.artemis.core.journal.EncodingSupport;
 import org.apache.activemq.artemis.core.journal.SequentialFileFactory;
 import org.apache.activemq.artemis.core.journal.impl.NIOSequentialFileFactory;
@@ -24,8 +26,6 @@ import org.apache.activemq.artemis.tests.unit.core.journal.impl.fakes.SimpleEnco
 import org.apache.activemq.artemis.tests.util.ActiveMQTestBase;
 import org.junit.Test;
 
-import java.io.File;
-
 public class NIOImportExportTest extends JournalImplTestBase
 {
 
@@ -41,7 +41,7 @@ public class NIOImportExportTest extends JournalImplTestBase
 
       file.mkdir();
 
-      return new NIOSequentialFileFactory(getTestDir(), true);
+      return new NIOSequentialFileFactory(getTestDirfile(), true);
    }
 
    // Constants -----------------------------------------------------

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/43889235/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/NIOJournalCompactTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/NIOJournalCompactTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/NIOJournalCompactTest.java
index 6478593..2166af8 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/NIOJournalCompactTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/NIOJournalCompactTest.java
@@ -1939,7 +1939,7 @@ public class NIOJournalCompactTest extends JournalImplTestBase
    @Override
    protected SequentialFileFactory getFileFactory() throws Exception
    {
-      return new NIOSequentialFileFactory(getTestDir());
+      return new NIOSequentialFileFactory(getTestDirfile());
    }
 
 }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/43889235/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/NIOJournalImplTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/NIOJournalImplTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/NIOJournalImplTest.java
index a8ba29a..ad7671f 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/NIOJournalImplTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/NIOJournalImplTest.java
@@ -39,7 +39,7 @@ public class NIOJournalImplTest extends JournalImplTestUnit
 
       file.mkdir();
 
-      return new NIOSequentialFileFactory(getTestDir(), true);
+      return new NIOSequentialFileFactory(getTestDirfile(), true);
    }
 
    @Override

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/43889235/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/NIONoBufferJournalImplTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/NIONoBufferJournalImplTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/NIONoBufferJournalImplTest.java
index a252a44..059bf59 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/NIONoBufferJournalImplTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/NIONoBufferJournalImplTest.java
@@ -38,7 +38,7 @@ public class NIONoBufferJournalImplTest extends JournalImplTestUnit
 
       file.mkdir();
 
-      return new NIOSequentialFileFactory(getTestDir(), false);
+      return new NIOSequentialFileFactory(new File(getTestDir()), false);
    }
 
    @Override

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/43889235/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/NIONonBufferedSequentialFileFactoryTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/NIONonBufferedSequentialFileFactoryTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/NIONonBufferedSequentialFileFactoryTest.java
index 376d24c..717d03c 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/NIONonBufferedSequentialFileFactoryTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/NIONonBufferedSequentialFileFactoryTest.java
@@ -15,6 +15,8 @@
  * limitations under the License.
  */
 package org.apache.activemq.artemis.tests.integration.journal;
+import java.io.File;
+
 import org.apache.activemq.artemis.core.journal.SequentialFileFactory;
 import org.apache.activemq.artemis.core.journal.impl.NIOSequentialFileFactory;
 import org.apache.activemq.artemis.tests.unit.core.journal.impl.SequentialFileFactoryTestBase;
@@ -25,7 +27,7 @@ public class NIONonBufferedSequentialFileFactoryTest extends SequentialFileFacto
    @Override
    protected SequentialFileFactory createFactory(String folder)
    {
-      return new NIOSequentialFileFactory(folder, false);
+      return new NIOSequentialFileFactory(new File(folder), false);
    }
 
 }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/43889235/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/NIOSequentialFileFactoryTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/NIOSequentialFileFactoryTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/NIOSequentialFileFactoryTest.java
index 2f82220..1ca667b 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/NIOSequentialFileFactoryTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/NIOSequentialFileFactoryTest.java
@@ -15,6 +15,8 @@
  * limitations under the License.
  */
 package org.apache.activemq.artemis.tests.integration.journal;
+import java.io.File;
+
 import org.apache.activemq.artemis.core.journal.SequentialFileFactory;
 import org.apache.activemq.artemis.core.journal.impl.NIOSequentialFileFactory;
 import org.apache.activemq.artemis.tests.unit.core.journal.impl.SequentialFileFactoryTestBase;
@@ -25,7 +27,7 @@ public class NIOSequentialFileFactoryTest extends SequentialFileFactoryTestBase
    @Override
    protected SequentialFileFactory createFactory(String folder)
    {
-      return new NIOSequentialFileFactory(folder, true);
+      return new NIOSequentialFileFactory(new File(folder), true);
    }
 
 }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/43889235/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/OldFormatTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/OldFormatTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/OldFormatTest.java
deleted file mode 100644
index 8e23b90..0000000
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/OldFormatTest.java
+++ /dev/null
@@ -1,148 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * 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
- *
- * 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.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.activemq.artemis.tests.integration.journal;
-
-import java.nio.ByteBuffer;
-
-import org.apache.activemq.artemis.core.journal.RecordInfo;
-import org.apache.activemq.artemis.core.journal.SequentialFile;
-import org.apache.activemq.artemis.core.journal.SequentialFileFactory;
-import org.apache.activemq.artemis.core.journal.impl.JournalImpl;
-import org.apache.activemq.artemis.core.journal.impl.NIOSequentialFileFactory;
-import org.apache.activemq.artemis.tests.unit.core.journal.impl.JournalImplTestBase;
-import org.apache.activemq.artemis.utils.DataConstants;
-import org.junit.Test;
-
-public class OldFormatTest extends JournalImplTestBase
-{
-
-   // Constants -----------------------------------------------------
-
-   // Attributes ----------------------------------------------------
-
-   // Static --------------------------------------------------------
-
-   // Constructors --------------------------------------------------
-
-   // Public --------------------------------------------------------
-
-   // This will generate records using the Version 1 format, and reading at the current version
-   @Test
-   public void testFormatOne() throws Exception
-   {
-      setup(2, 100 * 1024, true);
-
-      SequentialFile file = fileFactory.createSequentialFile("amq-1.amq", 1);
-
-      ByteBuffer buffer = ByteBuffer.allocateDirect(100 * 1024);
-
-      initHeader(buffer, 1);
-
-      byte[] record = new byte[1];
-
-      for (long i = 0; i < 10; i++)
-      {
-         add(buffer, 1, i, record);
-
-         update(buffer, 1, i, record);
-      }
-
-      file.open(1, false);
-
-      buffer.rewind();
-
-      file.writeDirect(buffer, true);
-
-      file.close();
-
-      createJournal();
-      startJournal();
-      loadAndCheck();
-
-      startCompact();
-      finishCompact();
-
-      stopJournal();
-      createJournal();
-      startJournal();
-      loadAndCheck();
-   }
-
-   private void add(ByteBuffer buffer, int fileID, long id, byte[] record)
-   {
-      int pos = buffer.position();
-
-      buffer.put(JournalImpl.ADD_RECORD);
-
-      buffer.putInt(fileID);
-
-      buffer.putLong(id);
-
-      buffer.putInt(record.length);
-
-      buffer.put((byte) 0);
-
-      buffer.put(record);
-
-      buffer.putInt(buffer.position() - pos + DataConstants.SIZE_INT);
-
-      records.add(new RecordInfo(id, (byte) 0, record, false, (short) 0));
-   }
-
-   private void update(ByteBuffer buffer, int fileID, long id, byte[] record)
-   {
-      int pos = buffer.position();
-
-      buffer.put(JournalImpl.UPDATE_RECORD);
-
-      buffer.putInt(fileID);
-
-      buffer.putLong(id);
-
-      buffer.putInt(record.length);
-
-      buffer.put((byte) 0);
-
-      buffer.put(record);
-
-      buffer.putInt(buffer.position() - pos + DataConstants.SIZE_INT);
-
-      records.add(new RecordInfo(id, (byte) 0, record, true, (short) 0));
-
-   }
-
-   /**
-    * @param buffer
-    */
-   private void initHeader(ByteBuffer buffer, int fileID)
-   {
-      buffer.putInt(1);
-
-      buffer.putInt(0);
-
-      buffer.putLong(fileID);
-   }
-
-   /* (non-Javadoc)
-    * @see JournalImplTestBase#getFileFactory()
-    */
-   @Override
-   protected SequentialFileFactory getFileFactory() throws Exception
-   {
-      return new NIOSequentialFileFactory(getTestDir());
-   }
-}

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/43889235/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/RelativePathTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/RelativePathTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/RelativePathTest.java
new file mode 100644
index 0000000..4bffdfd
--- /dev/null
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/RelativePathTest.java
@@ -0,0 +1,126 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * 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
+ *
+ * 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.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.activemq.artemis.tests.integration.journal;
+
+import java.io.File;
+import java.io.FileFilter;
+import java.util.HashMap;
+
+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.tests.util.ActiveMQTestBase;
+import org.junit.Assert;
+import org.junit.Test;
+
+public class RelativePathTest extends ActiveMQTestBase
+{
+   @Test
+   public void testRelativePathOnDefaultConfig() throws Exception
+   {
+      Configuration configuration = createDefaultConfig(false);
+      ActiveMQServer server = createServer(true, configuration, AddressSettings.DEFAULT_PAGE_SIZE, AddressSettings.DEFAULT_MAX_SIZE_BYTES, new HashMap<String, AddressSettings>());
+
+      server.start();
+      server.stop();
+
+      checkData(new File(configuration.getJournalDirectory()), ".amq");
+      checkData(new File(configuration.getBindingsDirectory()), ".bindings");
+   }
+
+   @Test
+   public void testDataOutsideHome() throws Exception
+   {
+      Configuration configuration = createDefaultConfig(false);
+
+      File instanceHome = new File(getTemporaryDir(), "artemisHome");
+
+      configuration.setArtemisInstance(instanceHome);
+
+      // the journal should be outside of the artemisInstance on this case
+      File journalOutside = new File(getTemporaryDir(), "./journalOut").getAbsoluteFile();
+      configuration.setJournalDirectory(journalOutside.getAbsolutePath());
+
+      // Somewhere inside artemis.instance
+      configuration.setBindingsDirectory("./bind");
+
+      File bindingsInside = new File(instanceHome, "bind");
+
+//      configuration.setJournal
+
+      System.out.println("Journal dir::" + configuration.getJournalDirectory());
+      System.out.println("Journal loc::" + configuration.getJournalLocation());
+
+      ActiveMQServer server = createServer(true, configuration, AddressSettings.DEFAULT_PAGE_SIZE, AddressSettings.DEFAULT_MAX_SIZE_BYTES, new HashMap<String, AddressSettings>());
+
+      server.start();
+      server.stop();
+
+      checkData(journalOutside, ".amq");
+      // Checking if the journal created the lock as well
+      checkData(journalOutside, "server.lock");
+      checkData(bindingsInside, ".bindings");
+   }
+
+   @Test
+   public void testRelativePath() throws Exception
+   {
+      Configuration configuration = createDefaultConfig(false);
+
+      File instanceHome = new File(getTemporaryDir(), "artemisHome");
+      File dataHome = new File(instanceHome, "data");
+      // One folder up for testing
+      File bindingsHome = new File(instanceHome, "../binx");
+
+      System.out.println("InstanceHome->" + instanceHome);
+      instanceHome.mkdirs();
+      configuration.setArtemisInstance(instanceHome);
+
+      configuration.setJournalDirectory("./data");
+      configuration.setPagingDirectory("./paging");
+      configuration.setBindingsDirectory("../binx");
+      // one folder up from instance home
+      configuration.setLargeMessagesDirectory("./large");
+
+      ActiveMQServer server = createServer(true, configuration, AddressSettings.DEFAULT_PAGE_SIZE, AddressSettings.DEFAULT_MAX_SIZE_BYTES, new HashMap<String, AddressSettings>());
+
+      server.start();
+      server.stop();
+
+      checkData(dataHome, ".amq");
+      checkData(bindingsHome, ".bindings");
+   }
+
+   public void checkData(File dataHome, final String extension)
+   {
+      Assert.assertTrue("Folder " + dataHome + " doesn't exist", dataHome.exists());
+
+      File[] files = dataHome.listFiles(new FileFilter()
+      {
+         @Override
+         public boolean accept(File pathname)
+         {
+            return (extension == null || pathname.toString().endsWith(extension));
+         }
+      });
+
+      Assert.assertNotNull(files);
+
+      Assert.assertTrue(files.length > 0);
+   }
+}

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/43889235/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/ValidateTransactionHealthTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/ValidateTransactionHealthTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/ValidateTransactionHealthTest.java
index 8d25a41..5e8587d 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/ValidateTransactionHealthTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/ValidateTransactionHealthTest.java
@@ -378,18 +378,18 @@ public class ValidateTransactionHealthTest extends ActiveMQTestBase
    {
       if (factoryType.equals("aio"))
       {
-         return new AIOSequentialFileFactory(directory,
+         return new AIOSequentialFileFactory(new File(directory),
                                              JournalConstants.DEFAULT_JOURNAL_BUFFER_SIZE_AIO,
                                              JournalConstants.DEFAULT_JOURNAL_BUFFER_TIMEOUT_AIO,
                                              false);
       }
       else if (factoryType.equals("nio2"))
       {
-         return new NIOSequentialFileFactory(directory, true);
+         return new NIOSequentialFileFactory(new File(directory), true);
       }
       else
       {
-         return new NIOSequentialFileFactory(directory, false);
+         return new NIOSequentialFileFactory(new File(directory), false);
       }
    }
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/43889235/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/replication/ReplicationTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/replication/ReplicationTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/replication/ReplicationTest.java
index a59b4b2..2990294 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/replication/ReplicationTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/replication/ReplicationTest.java
@@ -16,6 +16,20 @@
  */
 package org.apache.activemq.artemis.tests.integration.replication;
 
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+import java.util.concurrent.ScheduledExecutorService;
+import java.util.concurrent.ScheduledThreadPoolExecutor;
+import java.util.concurrent.ThreadFactory;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.atomic.AtomicBoolean;
+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;
@@ -67,8 +81,8 @@ import org.apache.activemq.artemis.core.server.impl.ServerMessageImpl;
 import org.apache.activemq.artemis.core.settings.HierarchicalRepository;
 import org.apache.activemq.artemis.core.settings.impl.AddressSettings;
 import org.apache.activemq.artemis.spi.core.protocol.RemotingConnection;
-import org.apache.activemq.artemis.tests.util.ReplicatedBackupUtils;
 import org.apache.activemq.artemis.tests.util.ActiveMQTestBase;
+import org.apache.activemq.artemis.tests.util.ReplicatedBackupUtils;
 import org.apache.activemq.artemis.tests.util.TransportConfigurationUtils;
 import org.apache.activemq.artemis.utils.ActiveMQThreadFactory;
 import org.apache.activemq.artemis.utils.ExecutorFactory;
@@ -78,20 +92,6 @@ import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Test;
 
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-import java.util.Map;
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Executors;
-import java.util.concurrent.ScheduledExecutorService;
-import java.util.concurrent.ScheduledThreadPoolExecutor;
-import java.util.concurrent.ThreadFactory;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.atomic.AtomicBoolean;
-import java.util.concurrent.atomic.AtomicInteger;
-
 public final class ReplicationTest extends ActiveMQTestBase
 {
 
@@ -653,7 +653,7 @@ public final class ReplicationTest extends ActiveMQTestBase
                                              final HierarchicalRepository<AddressSettings> addressSettingsRepository) throws Exception
    {
 
-      PagingManager paging = new PagingManagerImpl(new PagingStoreFactoryNIO(storageManager, configuration.getPagingDirectory(),
+      PagingManager paging = new PagingManagerImpl(new PagingStoreFactoryNIO(storageManager, configuration.getPagingLocation(),
                                                                              1000, null,
                                                                              executorFactory, false, null),
                                                    addressSettingsRepository);

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/43889235/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/util/JournalExample.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/util/JournalExample.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/util/JournalExample.java
deleted file mode 100644
index e7eb876..0000000
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/util/JournalExample.java
+++ /dev/null
@@ -1,158 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * 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
- *
- * 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.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.activemq.artemis.tests.util;
-
-import java.util.ArrayList;
-
-import org.apache.activemq.artemis.core.journal.PreparedTransactionInfo;
-import org.apache.activemq.artemis.core.journal.RecordInfo;
-import org.apache.activemq.artemis.core.journal.SequentialFileFactory;
-import org.apache.activemq.artemis.core.journal.impl.AIOSequentialFileFactory;
-import org.apache.activemq.artemis.core.journal.impl.JournalImpl;
-import org.apache.activemq.artemis.utils.TimeAndCounterIDGenerator;
-
-/**
- * A JournalExample: Just an example on how to use the Journal Directly
- * <br>
- * TODO: find a better place to store this example
- */
-public class JournalExample
-{
-
-   // Constants -----------------------------------------------------
-
-   // Attributes ----------------------------------------------------
-
-   // Static --------------------------------------------------------
-
-   // Constructors --------------------------------------------------
-
-   // Public --------------------------------------------------------
-
-   // Package protected ---------------------------------------------
-
-   // Protected -----------------------------------------------------
-
-   // Private -------------------------------------------------------
-
-   // Inner classes -------------------------------------------------
-
-   public static void main(final String[] arg)
-   {
-      TimeAndCounterIDGenerator idgenerator = new TimeAndCounterIDGenerator();
-      try
-      {
-         SequentialFileFactory fileFactory = new AIOSequentialFileFactory("/tmp"); // any dir you want
-         // SequentialFileFactory fileFactory = new NIOSequentialFileFactory("/tmp"); // any dir you want
-         JournalImpl journalExample = new JournalImpl(10 * 1024 * 1024, // 10M.. we believe that's the usual cilinder
-                                                      // bufferSize.. not an exact science here
-                                                      2, // number of files pre-allocated
-                                                      0,
-                                                      0,
-                                                      fileFactory, // AIO or NIO
-                                                      "exjournal", // file name
-                                                      "dat", // extension
-                                                      10000); // it's like a semaphore for callback on the AIO layer
-
-         ArrayList<RecordInfo> committedRecords = new ArrayList<RecordInfo>();
-         ArrayList<PreparedTransactionInfo> preparedTransactions = new ArrayList<PreparedTransactionInfo>();
-         journalExample.start();
-         System.out.println("Loading records and creating data files");
-         journalExample.load(committedRecords, preparedTransactions, null);
-
-         System.out.println("Loaded Record List:");
-
-         for (RecordInfo record : committedRecords)
-         {
-            System.out.println("Record id = " + record.id +
-                                  " userType = " +
-                                  record.userRecordType +
-                                  " with " +
-                                  record.data.length +
-                                  " bytes is stored on the journal");
-         }
-
-         System.out.println("Adding Records:");
-
-         for (int i = 0; i < 10; i++)
-         {
-            journalExample.appendAddRecord(idgenerator.generateID(), (byte) 1, new byte[]{
-               0,
-               1,
-               2,
-               0,
-               1,
-               2,
-               0,
-               1,
-               2,
-               0,
-               1,
-               2,
-               0,
-               1,
-               2,
-               0,
-               1,
-               2,
-               0,
-               1,
-               2}, false);
-         }
-
-         long tx = idgenerator.generateID(); // some id generation system
-
-         for (int i = 0; i < 100; i++)
-         {
-            journalExample.appendAddRecordTransactional(tx, idgenerator.generateID(), (byte) 2, new byte[]{0,
-               1,
-               2,
-               0,
-               1,
-               2,
-               0,
-               1,
-               2,
-               0,
-               1,
-               2,
-               0,
-               1,
-               2,
-               0,
-               1,
-               2,
-               0,
-               1,
-               2,
-               5});
-         }
-
-         // After this is complete, you're sure the records are there
-         journalExample.appendCommitRecord(tx, true);
-
-         System.out.println("Done!");
-
-         journalExample.stop();
-      }
-      catch (Exception e)
-      {
-         e.printStackTrace();
-      }
-   }
-
-}

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/43889235/tests/performance-tests/src/test/java/org/apache/activemq/artemis/tests/performance/journal/RealJournalImplAIOTest.java
----------------------------------------------------------------------
diff --git a/tests/performance-tests/src/test/java/org/apache/activemq/artemis/tests/performance/journal/RealJournalImplAIOTest.java b/tests/performance-tests/src/test/java/org/apache/activemq/artemis/tests/performance/journal/RealJournalImplAIOTest.java
index 2439339..7fa9e14 100644
--- a/tests/performance-tests/src/test/java/org/apache/activemq/artemis/tests/performance/journal/RealJournalImplAIOTest.java
+++ b/tests/performance-tests/src/test/java/org/apache/activemq/artemis/tests/performance/journal/RealJournalImplAIOTest.java
@@ -51,7 +51,7 @@ public class RealJournalImplAIOTest extends JournalImplTestUnit
 
       file.mkdir();
 
-      return new AIOSequentialFileFactory(getTestDir());
+      return new AIOSequentialFileFactory(getTestDirfile());
    }
 
 }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/43889235/tests/performance-tests/src/test/java/org/apache/activemq/artemis/tests/performance/journal/RealJournalImplNIOTest.java
----------------------------------------------------------------------
diff --git a/tests/performance-tests/src/test/java/org/apache/activemq/artemis/tests/performance/journal/RealJournalImplNIOTest.java b/tests/performance-tests/src/test/java/org/apache/activemq/artemis/tests/performance/journal/RealJournalImplNIOTest.java
index c95f853..4d2fbcf 100644
--- a/tests/performance-tests/src/test/java/org/apache/activemq/artemis/tests/performance/journal/RealJournalImplNIOTest.java
+++ b/tests/performance-tests/src/test/java/org/apache/activemq/artemis/tests/performance/journal/RealJournalImplNIOTest.java
@@ -37,7 +37,7 @@ public class RealJournalImplNIOTest extends JournalImplTestUnit
 
       file.mkdir();
 
-      return new NIOSequentialFileFactory(getTestDir());
+      return new NIOSequentialFileFactory(getTestDirfile());
    }
 
 }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/43889235/tests/stress-tests/src/test/java/org/apache/activemq/artemis/tests/stress/journal/AIOAllPossibilitiesCompactStressTest.java
----------------------------------------------------------------------
diff --git a/tests/stress-tests/src/test/java/org/apache/activemq/artemis/tests/stress/journal/AIOAllPossibilitiesCompactStressTest.java b/tests/stress-tests/src/test/java/org/apache/activemq/artemis/tests/stress/journal/AIOAllPossibilitiesCompactStressTest.java
index 949891f..a3a9e1f 100644
--- a/tests/stress-tests/src/test/java/org/apache/activemq/artemis/tests/stress/journal/AIOAllPossibilitiesCompactStressTest.java
+++ b/tests/stress-tests/src/test/java/org/apache/activemq/artemis/tests/stress/journal/AIOAllPossibilitiesCompactStressTest.java
@@ -51,7 +51,7 @@ public class AIOAllPossibilitiesCompactStressTest extends AllPossibilitiesCompac
 
       file.mkdir();
 
-      return new AIOSequentialFileFactory(getTestDir(),
+      return new AIOSequentialFileFactory(getTestDirfile(),
                                           JournalConstants.DEFAULT_JOURNAL_BUFFER_SIZE_AIO,
                                           1000000,
                                           false);

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/43889235/tests/stress-tests/src/test/java/org/apache/activemq/artemis/tests/stress/journal/AddAndRemoveStressTest.java
----------------------------------------------------------------------
diff --git a/tests/stress-tests/src/test/java/org/apache/activemq/artemis/tests/stress/journal/AddAndRemoveStressTest.java b/tests/stress-tests/src/test/java/org/apache/activemq/artemis/tests/stress/journal/AddAndRemoveStressTest.java
index 5e21718..83ed360 100644
--- a/tests/stress-tests/src/test/java/org/apache/activemq/artemis/tests/stress/journal/AddAndRemoveStressTest.java
+++ b/tests/stress-tests/src/test/java/org/apache/activemq/artemis/tests/stress/journal/AddAndRemoveStressTest.java
@@ -76,7 +76,7 @@ public class AddAndRemoveStressTest extends ActiveMQTestBase
    public void testInsertAndLoad() throws Exception
    {
 
-      SequentialFileFactory factory = new AIOSequentialFileFactory(getTestDir());
+      SequentialFileFactory factory = new AIOSequentialFileFactory(getTestDirfile());
       JournalImpl impl = new JournalImpl(10 * 1024 * 1024,
                                          AddAndRemoveStressTest.NUMBER_OF_FILES_ON_JOURNAL,
                                          0,
@@ -101,7 +101,7 @@ public class AddAndRemoveStressTest extends ActiveMQTestBase
 
       impl.stop();
 
-      factory = new AIOSequentialFileFactory(getTestDir());
+      factory = new AIOSequentialFileFactory(getTestDirfile());
       impl = new JournalImpl(10 * 1024 * 1024,
                              AddAndRemoveStressTest.NUMBER_OF_FILES_ON_JOURNAL,
                              0,
@@ -127,7 +127,7 @@ public class AddAndRemoveStressTest extends ActiveMQTestBase
 
       impl.stop();
 
-      factory = new AIOSequentialFileFactory(getTestDir());
+      factory = new AIOSequentialFileFactory(getTestDirfile());
       impl = new JournalImpl(10 * 1024 * 1024,
                              AddAndRemoveStressTest.NUMBER_OF_FILES_ON_JOURNAL,
                              0,
@@ -164,7 +164,7 @@ public class AddAndRemoveStressTest extends ActiveMQTestBase
    public void testInsertUpdateAndLoad() throws Exception
    {
 
-      SequentialFileFactory factory = new AIOSequentialFileFactory(getTestDir());
+      SequentialFileFactory factory = new AIOSequentialFileFactory(getTestDirfile());
       JournalImpl impl = new JournalImpl(10 * 1024 * 1024,
                                          AddAndRemoveStressTest.NUMBER_OF_FILES_ON_JOURNAL,
                                          0,
@@ -190,7 +190,7 @@ public class AddAndRemoveStressTest extends ActiveMQTestBase
 
       impl.stop();
 
-      factory = new AIOSequentialFileFactory(getTestDir());
+      factory = new AIOSequentialFileFactory(getTestDirfile());
       impl = new JournalImpl(10 * 1024 * 1024, 10, 0, 0, factory, "amq", "amq", 1000);
 
       impl.start();
@@ -209,7 +209,7 @@ public class AddAndRemoveStressTest extends ActiveMQTestBase
 
       impl.stop();
 
-      factory = new AIOSequentialFileFactory(getTestDir());
+      factory = new AIOSequentialFileFactory(getTestDirfile());
       impl = new JournalImpl(10 * 1024 * 1024,
                              AddAndRemoveStressTest.NUMBER_OF_FILES_ON_JOURNAL,
                              0,

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/43889235/tests/stress-tests/src/test/java/org/apache/activemq/artemis/tests/stress/journal/JournalCleanupCompactStressTest.java
----------------------------------------------------------------------
diff --git a/tests/stress-tests/src/test/java/org/apache/activemq/artemis/tests/stress/journal/JournalCleanupCompactStressTest.java b/tests/stress-tests/src/test/java/org/apache/activemq/artemis/tests/stress/journal/JournalCleanupCompactStressTest.java
index d8e659e..9516700 100644
--- a/tests/stress-tests/src/test/java/org/apache/activemq/artemis/tests/stress/journal/JournalCleanupCompactStressTest.java
+++ b/tests/stress-tests/src/test/java/org/apache/activemq/artemis/tests/stress/journal/JournalCleanupCompactStressTest.java
@@ -114,12 +114,12 @@ public class JournalCleanupCompactStressTest extends ActiveMQTestBase
       int maxAIO;
       if (AsynchronousFileImpl.isLoaded())
       {
-         factory = new AIOSequentialFileFactory(dir.getPath());
+         factory = new AIOSequentialFileFactory(dir);
          maxAIO = ActiveMQDefaultConfiguration.getDefaultJournalMaxIoAio();
       }
       else
       {
-         factory = new NIOSequentialFileFactory(dir.getPath(), true);
+         factory = new NIOSequentialFileFactory(dir, true);
          maxAIO = ActiveMQDefaultConfiguration.getDefaultJournalMaxIoNio();
       }
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/43889235/tests/stress-tests/src/test/java/org/apache/activemq/artemis/tests/stress/journal/MixupCompactorTestBase.java
----------------------------------------------------------------------
diff --git a/tests/stress-tests/src/test/java/org/apache/activemq/artemis/tests/stress/journal/MixupCompactorTestBase.java b/tests/stress-tests/src/test/java/org/apache/activemq/artemis/tests/stress/journal/MixupCompactorTestBase.java
index 13aa3b3..d351fe5 100644
--- a/tests/stress-tests/src/test/java/org/apache/activemq/artemis/tests/stress/journal/MixupCompactorTestBase.java
+++ b/tests/stress-tests/src/test/java/org/apache/activemq/artemis/tests/stress/journal/MixupCompactorTestBase.java
@@ -241,6 +241,6 @@ public abstract class MixupCompactorTestBase extends JournalImplTestBase
    @Override
    protected SequentialFileFactory getFileFactory() throws Exception
    {
-      return new NIOSequentialFileFactory(getTestDir());
+      return new NIOSequentialFileFactory(getTestDirfile());
    }
 }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/43889235/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 f8a6475..616c4a3 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
@@ -16,6 +16,13 @@
  */
 package org.apache.activemq.artemis.tests.stress.journal;
 
+import javax.transaction.xa.XAResource;
+import javax.transaction.xa.Xid;
+import java.io.File;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.concurrent.CountDownLatch;
+
 import org.apache.activemq.artemis.api.config.ActiveMQDefaultConfiguration;
 import org.apache.activemq.artemis.api.core.ActiveMQException;
 import org.apache.activemq.artemis.api.core.SimpleString;
@@ -38,12 +45,6 @@ import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Test;
 
-import javax.transaction.xa.XAResource;
-import javax.transaction.xa.Xid;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.concurrent.CountDownLatch;
-
 public class NIOMultiThreadCompactorStressTest extends ActiveMQTestBase
 {
 
@@ -89,7 +90,7 @@ public class NIOMultiThreadCompactorStressTest extends ActiveMQTestBase
          internalTestProduceAndConsume();
          stopServer();
 
-         NIOSequentialFileFactory factory = new NIOSequentialFileFactory(getJournalDir());
+         NIOSequentialFileFactory factory = new NIOSequentialFileFactory(new File(getJournalDir()));
          JournalImpl journal = new JournalImpl(ActiveMQDefaultConfiguration.getDefaultJournalFileSize(),
                                                2,
                                                0,

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/43889235/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 1cc3872..385d604 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
@@ -39,7 +39,7 @@ public class AIOJournalImplTest extends JournalImplTestUnit
 
       file.mkdir();
 
-      return new AIOSequentialFileFactory(getTestDir());
+      return new AIOSequentialFileFactory(getTestDirfile());
    }
 
 }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/43889235/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 48e989f..c607493 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,6 @@ package org.apache.activemq.artemis.tests.timing.core.journal.impl;
 
 import java.io.File;
 
-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;
@@ -27,20 +26,12 @@ public class NIOJournalImplTest extends JournalImplTestUnit
 {
    private static final UnitTestLogger log = UnitTestLogger.LOGGER;
 
-   protected String journalDir = System.getProperty("java.io.tmpdir", "/tmp") + "/journal-test";
-
    @Override
    protected SequentialFileFactory getFileFactory() throws Exception
    {
-      File file = new File(journalDir);
-
-      NIOJournalImplTest.log.debug("deleting directory " + journalDir);
-
-      ActiveMQTestBase.deleteDirectory(file);
-
-      file.mkdir();
+      File file = new File(getTemporaryDir());
 
-      return new NIOSequentialFileFactory(journalDir);
+      return new NIOSequentialFileFactory(file);
    }
 
 }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/43889235/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 78e0dd4..e078043 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
@@ -16,18 +16,17 @@
  */
 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.ActiveMQTestBase;
-import org.junit.Test;
-
+import java.io.File;
 import java.nio.ByteBuffer;
 
-import org.junit.Assert;
-
 import org.apache.activemq.artemis.core.asyncio.impl.AsynchronousFileImpl;
 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;
+import org.apache.activemq.artemis.tests.unit.core.journal.impl.fakes.FakeSequentialFileFactory;
+import org.apache.activemq.artemis.tests.util.ActiveMQTestBase;
+import org.junit.Assert;
+import org.junit.Test;
 
 public class CleanBufferTest extends ActiveMQTestBase
 {
@@ -45,7 +44,7 @@ public class CleanBufferTest extends ActiveMQTestBase
    @Test
    public void testCleanOnNIO()
    {
-      SequentialFileFactory factory = new NIOSequentialFileFactory("Whatever");
+      SequentialFileFactory factory = new NIOSequentialFileFactory(new File("Whatever"));
 
       testBuffer(factory);
    }
@@ -55,7 +54,7 @@ public class CleanBufferTest extends ActiveMQTestBase
    {
       if (AsynchronousFileImpl.isLoaded())
       {
-         SequentialFileFactory factory = new AIOSequentialFileFactory("Whatever");
+         SequentialFileFactory factory = new AIOSequentialFileFactory(new File("Whatever"));
 
          testBuffer(factory);
       }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/43889235/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/journal/impl/fakes/FakeSequentialFileFactory.java
----------------------------------------------------------------------
diff --git a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/journal/impl/fakes/FakeSequentialFileFactory.java b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/journal/impl/fakes/FakeSequentialFileFactory.java
index 864d28e..59586fd 100644
--- a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/journal/impl/fakes/FakeSequentialFileFactory.java
+++ b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/journal/impl/fakes/FakeSequentialFileFactory.java
@@ -728,7 +728,7 @@ public class FakeSequentialFileFactory implements SequentialFileFactory
    }
 
    @Override
-   public String getDirectory()
+   public File getDirectory()
    {
       // TODO Auto-generated method stub
       return null;

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/43889235/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/paging/impl/PageTest.java
----------------------------------------------------------------------
diff --git a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/paging/impl/PageTest.java b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/paging/impl/PageTest.java
index 6368a22..8c4ff47 100644
--- a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/paging/impl/PageTest.java
+++ b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/paging/impl/PageTest.java
@@ -22,8 +22,6 @@ import java.util.List;
 
 import org.apache.activemq.artemis.api.core.ActiveMQBuffer;
 import org.apache.activemq.artemis.api.core.SimpleString;
-import org.apache.activemq.artemis.tests.unit.core.journal.impl.fakes.FakeSequentialFileFactory;
-import org.apache.activemq.artemis.tests.util.ActiveMQTestBase;
 import org.apache.activemq.artemis.core.journal.SequentialFile;
 import org.apache.activemq.artemis.core.journal.SequentialFileFactory;
 import org.apache.activemq.artemis.core.journal.impl.NIOSequentialFileFactory;
@@ -33,6 +31,8 @@ import org.apache.activemq.artemis.core.paging.impl.PagedMessageImpl;
 import org.apache.activemq.artemis.core.persistence.impl.nullpm.NullStorageManager;
 import org.apache.activemq.artemis.core.server.ServerMessage;
 import org.apache.activemq.artemis.core.server.impl.ServerMessageImpl;
+import org.apache.activemq.artemis.tests.unit.core.journal.impl.fakes.FakeSequentialFileFactory;
+import org.apache.activemq.artemis.tests.util.ActiveMQTestBase;
 import org.junit.Assert;
 import org.junit.Test;
 
@@ -52,14 +52,14 @@ public class PageTest extends ActiveMQTestBase
    public void testPageWithNIO() throws Exception
    {
       recreateDirectory(getTestDir());
-      testAdd(new NIOSequentialFileFactory(getTestDir()), 1000);
+      testAdd(new NIOSequentialFileFactory(getTestDirfile()), 1000);
    }
 
    @Test
    public void testDamagedDataWithNIO() throws Exception
    {
       recreateDirectory(getTestDir());
-      testDamagedPage(new NIOSequentialFileFactory(getTestDir()), 1000);
+      testDamagedPage(new NIOSequentialFileFactory(getTestDirfile()), 1000);
    }
 
    @Test

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/43889235/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/paging/impl/PagingManagerImplTest.java
----------------------------------------------------------------------
diff --git a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/paging/impl/PagingManagerImplTest.java b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/paging/impl/PagingManagerImplTest.java
index fc92f53..9649966 100644
--- a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/paging/impl/PagingManagerImplTest.java
+++ b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/paging/impl/PagingManagerImplTest.java
@@ -57,7 +57,7 @@ public class PagingManagerImplTest extends ActiveMQTestBase
       final StorageManager storageManager = new NullStorageManager();
 
       PagingStoreFactoryNIO storeFactory =
-         new PagingStoreFactoryNIO(storageManager, getPageDir(), 100, null, getOrderedExecutor(), true, null);
+         new PagingStoreFactoryNIO(storageManager, getPageDirFile(), 100, null, getOrderedExecutor(), true, null);
 
       PagingManagerImpl managerImpl = new PagingManagerImpl(storeFactory, addressSettings);
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/43889235/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/paging/impl/PagingStoreImplTest.java
----------------------------------------------------------------------
diff --git a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/paging/impl/PagingStoreImplTest.java b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/paging/impl/PagingStoreImplTest.java
index 4276182..1a657c1 100644
--- a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/paging/impl/PagingStoreImplTest.java
+++ b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/paging/impl/PagingStoreImplTest.java
@@ -16,6 +16,7 @@
  */
 package org.apache.activemq.artemis.tests.unit.core.paging.impl;
 
+import java.io.File;
 import java.nio.ByteBuffer;
 import java.util.ArrayList;
 import java.util.List;
@@ -128,7 +129,7 @@ public class PagingStoreImplTest extends ActiveMQTestBase
    public void testPageWithNIO() throws Exception
    {
       ActiveMQTestBase.recreateDirectory(getTestDir());
-      testConcurrentPaging(new NIOSequentialFileFactory(getTestDir()), 1);
+      testConcurrentPaging(new NIOSequentialFileFactory(new File(getTestDir())), 1);
    }
 
    @Test
@@ -644,7 +645,7 @@ public class PagingStoreImplTest extends ActiveMQTestBase
    public void testRestartPage() throws Throwable
    {
       clearDataRecreateServerDirs();
-      SequentialFileFactory factory = new NIOSequentialFileFactory(getPageDir());
+      SequentialFileFactory factory = new NIOSequentialFileFactory(new File(getPageDir()));
 
       PagingStoreFactory storeFactory = new FakeStoreFactory(factory);
 
@@ -681,7 +682,7 @@ public class PagingStoreImplTest extends ActiveMQTestBase
    public void testOrderOnPaging() throws Throwable
    {
       clearDataRecreateServerDirs();
-      SequentialFileFactory factory = new NIOSequentialFileFactory(getPageDir());
+      SequentialFileFactory factory = new NIOSequentialFileFactory(new File(getPageDir()));
 
       PagingStoreFactory storeFactory = new FakeStoreFactory(factory);
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/43889235/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/persistence/impl/BatchIDGeneratorUnitTest.java
----------------------------------------------------------------------
diff --git a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/persistence/impl/BatchIDGeneratorUnitTest.java b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/persistence/impl/BatchIDGeneratorUnitTest.java
index 48a85b1..3c1fb88 100644
--- a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/persistence/impl/BatchIDGeneratorUnitTest.java
+++ b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/persistence/impl/BatchIDGeneratorUnitTest.java
@@ -15,6 +15,7 @@
  * limitations under the License.
  */
 package org.apache.activemq.artemis.tests.unit.core.persistence.impl;
+import java.io.File;
 import java.util.ArrayList;
 
 import org.apache.activemq.artemis.api.core.ActiveMQBuffer;
@@ -38,7 +39,7 @@ public class BatchIDGeneratorUnitTest extends ActiveMQTestBase
    @Test
    public void testSequence() throws Exception
    {
-      NIOSequentialFileFactory factory = new NIOSequentialFileFactory(getTestDir());
+      NIOSequentialFileFactory factory = new NIOSequentialFileFactory(new File(getTestDir()));
       Journal journal = new JournalImpl(10 * 1024, 2, 0, 0, factory, "activemq-bindings", "bindings", 1);
 
       journal.start();

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/43889235/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/server/impl/FileLockTest.java
----------------------------------------------------------------------
diff --git a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/server/impl/FileLockTest.java b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/server/impl/FileLockTest.java
index 6eefcc4..643e6c2 100644
--- a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/server/impl/FileLockTest.java
+++ b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/server/impl/FileLockTest.java
@@ -15,16 +15,14 @@
  * limitations under the License.
  */
 package org.apache.activemq.artemis.tests.unit.core.server.impl;
-import org.apache.activemq.artemis.tests.util.ActiveMQTestBase;
-import org.junit.Before;
-
-import org.junit.Test;
-
 import java.io.File;
 
 import org.apache.activemq.artemis.core.asyncio.impl.AsynchronousFileImpl;
 import org.apache.activemq.artemis.core.server.impl.AIOFileLockNodeManager;
 import org.apache.activemq.artemis.core.server.impl.FileLockNodeManager;
+import org.apache.activemq.artemis.tests.util.ActiveMQTestBase;
+import org.junit.Before;
+import org.junit.Test;
 
 public class FileLockTest extends ActiveMQTestBase
 {
@@ -42,7 +40,7 @@ public class FileLockTest extends ActiveMQTestBase
    @Test
    public void testNIOLock() throws Exception
    {
-      doTestLock(new FileLockNodeManager(getTestDir(), false), new FileLockNodeManager(getTestDir(), false));
+      doTestLock(new FileLockNodeManager(getTestDirfile(), false), new FileLockNodeManager(getTestDirfile(), false));
 
    }
 
@@ -51,7 +49,7 @@ public class FileLockTest extends ActiveMQTestBase
    {
       if (AsynchronousFileImpl.isLoaded())
       {
-         doTestLock(new AIOFileLockNodeManager(getTestDir(), false), new AIOFileLockNodeManager(getTestDir(), false));
+         doTestLock(new AIOFileLockNodeManager(getTestDirfile(), false), new AIOFileLockNodeManager(getTestDirfile(), false));
       }
 
    }


Mime
View raw message