activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jstrac...@apache.org
Subject svn commit: r511947 - in /activemq/trunk/activemq-core: ./ src/main/java/org/apache/activemq/broker/ src/main/java/org/apache/activemq/store/ src/main/java/org/apache/activemq/store/amq/ src/main/java/org/apache/activemq/store/jdbc/ src/main/java/org/a...
Date Mon, 26 Feb 2007 19:01:24 GMT
Author: jstrachan
Date: Mon Feb 26 11:01:22 2007
New Revision: 511947

URL: http://svn.apache.org/viewvc?view=rev&rev=511947
Log:
added a helper class so that system properties can be used to overload the default prefix
for auto-created data directories. Also patched the test cases to use a relative to target/
directory for easier cleaning

Added:
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/util/IOHelper.java   (with
props)
Modified:
    activemq/trunk/activemq-core/pom.xml
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/BrokerService.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/DefaultPersistenceAdapterFactory.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/amq/AMQPersistenceAdapter.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/DataSourceSupport.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/quick/QuickPersistenceAdapter.java
    activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/ft/TransactedTopicMasterSlaveTest.java
    activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/region/cursors/KahaCursorDurableTest.java
    activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/region/cursors/KahaQueueStoreTest.java
    activemq/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/JmsDurableTopicSlowReceiveTest.java
    activemq/trunk/activemq-core/src/test/java/org/apache/activemq/kaha/impl/index/hash/HashTest.java
    activemq/trunk/activemq-core/src/test/java/org/apache/activemq/perf/AMQStoreDurableTopicTest.java
    activemq/trunk/activemq-core/src/test/java/org/apache/activemq/perf/AMQStoreQueueTest.java
    activemq/trunk/activemq-core/src/test/java/org/apache/activemq/perf/JournalKahaDurableTopicTest.java
    activemq/trunk/activemq-core/src/test/java/org/apache/activemq/perf/JournalKahaQueueTest.java
    activemq/trunk/activemq-core/src/test/java/org/apache/activemq/perf/KahaDurableTopicTest.java
    activemq/trunk/activemq-core/src/test/java/org/apache/activemq/perf/KahaQueueTest.java
    activemq/trunk/activemq-core/src/test/java/org/apache/activemq/perf/QueueConnectionMemoryTest.java
    activemq/trunk/activemq-core/src/test/java/org/apache/activemq/perf/QuickStoreDurableTopicTest.java
    activemq/trunk/activemq-core/src/test/java/org/apache/activemq/perf/QuickStoreQueueTest.java
    activemq/trunk/activemq-core/src/test/java/org/apache/activemq/perf/RapidStoreQueueTest.java
    activemq/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/PublishOnQueueConsumedMessageInTransactionTest.java
    activemq/trunk/activemq-core/src/test/resources/org/apache/activemq/perf/kahaBroker.xml

Modified: activemq/trunk/activemq-core/pom.xml
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/pom.xml?view=diff&rev=511947&r1=511946&r2=511947
==============================================================================
--- activemq/trunk/activemq-core/pom.xml (original)
+++ activemq/trunk/activemq-core/pom.xml Mon Feb 26 11:01:22 2007
@@ -181,6 +181,14 @@
           <childDelegation>false</childDelegation>
           <useFile>true</useFile>
           <argLine>-Xmx512M</argLine>
+
+           <systemProperties>
+            <property>
+              <name>org.apache.activemq.default.directory.prefix</name>
+              <value>target/</value>
+            </property>
+          </systemProperties>
+
           <includes>
             <include>**/*Test.*</include>
           </includes>

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/BrokerService.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/BrokerService.java?view=diff&rev=511947&r1=511946&r2=511947
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/BrokerService.java
(original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/BrokerService.java
Mon Feb 26 11:01:22 2007
@@ -73,6 +73,7 @@
 import org.apache.activemq.store.DefaultPersistenceAdapterFactory;
 import org.apache.activemq.store.PersistenceAdapter;
 import org.apache.activemq.store.PersistenceAdapterFactory;
+import org.apache.activemq.store.jdbc.DataSourceSupport;
 import org.apache.activemq.store.memory.MemoryPersistenceAdapter;
 import org.apache.activemq.thread.TaskRunnerFactory;
 import org.apache.activemq.transport.TransportFactory;
@@ -82,6 +83,7 @@
 import org.apache.activemq.util.JMXSupport;
 import org.apache.activemq.util.ServiceStopper;
 import org.apache.activemq.util.URISupport;
+import org.apache.activemq.util.IOHelper;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 
@@ -553,7 +555,7 @@
 
     public File getDataDirectory() {
         if (dataDirectory == null) {
-            dataDirectory = new File(new File("activemq-data"), getBrokerName()
+            dataDirectory = new File(new File(IOHelper.getDefaultDataDirectory()), getBrokerName()
                     .replaceAll("[^a-zA-Z0-9\\.\\_\\-]", "_"));
         }
         return dataDirectory;

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/DefaultPersistenceAdapterFactory.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/DefaultPersistenceAdapterFactory.java?view=diff&rev=511947&r1=511946&r2=511947
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/DefaultPersistenceAdapterFactory.java
(original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/DefaultPersistenceAdapterFactory.java
Mon Feb 26 11:01:22 2007
@@ -30,6 +30,7 @@
 import org.apache.activemq.store.journal.JournalPersistenceAdapter;
 import org.apache.activemq.store.kahadaptor.KahaPersistenceAdapter;
 import org.apache.activemq.thread.TaskRunnerFactory;
+import org.apache.activemq.util.IOHelper;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 
@@ -66,7 +67,7 @@
 //        if( useQuickJournal ) {
 //            return new QuickJournalPersistenceAdapter(getJournal(), jdbcPersistenceAdapter,
getTaskRunnerFactory());
 //        }  else {
-            KahaPersistenceAdapter adaptor = new KahaPersistenceAdapter(new File("amqstore"));

+            KahaPersistenceAdapter adaptor = new KahaPersistenceAdapter(new File(IOHelper.getDefaultStoreDirectory()));

             return new JournalPersistenceAdapter(getJournal(), jdbcPersistenceAdapter, getTaskRunnerFactory());
             //return new JournalPersistenceAdapter(getJournal(), adaptor, getTaskRunnerFactory());
 //        }

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/amq/AMQPersistenceAdapter.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/amq/AMQPersistenceAdapter.java?view=diff&rev=511947&r1=511946&r2=511947
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/amq/AMQPersistenceAdapter.java
(original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/amq/AMQPersistenceAdapter.java
Mon Feb 26 11:01:22 2007
@@ -62,6 +62,7 @@
 import org.apache.activemq.thread.TaskRunnerFactory;
 import org.apache.activemq.util.ByteSequence;
 import org.apache.activemq.util.IOExceptionSupport;
+import org.apache.activemq.util.IOHelper;
 import org.apache.activemq.wireformat.WireFormat;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
@@ -105,7 +106,7 @@
 
 	private Runnable periodicCleanupTask;
 	private boolean deleteAllMessages;
-	private File directory = new File("activemq-data/quick");
+	private File directory = new File(IOHelper.getDefaultDataDirectory() + "/quick");
 
 
     

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/DataSourceSupport.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/DataSourceSupport.java?view=diff&rev=511947&r1=511946&r2=511947
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/DataSourceSupport.java
(original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/DataSourceSupport.java
Mon Feb 26 11:01:22 2007
@@ -18,6 +18,7 @@
 package org.apache.activemq.store.jdbc;
 
 import org.apache.derby.jdbc.EmbeddedDataSource;
+import org.apache.activemq.util.IOHelper;
 
 import javax.sql.DataSource;
 
@@ -32,7 +33,7 @@
  */
 public class DataSourceSupport {
 
-    private String dataDirectory = "activemq-data";
+    private String dataDirectory = IOHelper.getDefaultDataDirectory();
     private File dataDirectoryFile;
     private DataSource dataSource;
 

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/quick/QuickPersistenceAdapter.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/quick/QuickPersistenceAdapter.java?view=diff&rev=511947&r1=511946&r2=511947
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/quick/QuickPersistenceAdapter.java
(original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/quick/QuickPersistenceAdapter.java
Mon Feb 26 11:01:22 2007
@@ -61,6 +61,7 @@
 import org.apache.activemq.thread.TaskRunnerFactory;
 import org.apache.activemq.util.ByteSequence;
 import org.apache.activemq.util.IOExceptionSupport;
+import org.apache.activemq.util.IOHelper;
 import org.apache.activemq.wireformat.WireFormat;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
@@ -104,7 +105,7 @@
 
 	private Runnable periodicCleanupTask;
 	private boolean deleteAllMessages;
-	private File directory = new File("activemq-data/quick");
+	private File directory = new File(IOHelper.getDefaultDataDirectory() + "/quick");
 
 
     

Added: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/util/IOHelper.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/util/IOHelper.java?view=auto&rev=511947
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/util/IOHelper.java (added)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/util/IOHelper.java Mon
Feb 26 11:01:22 2007
@@ -0,0 +1,45 @@
+/**
+ *
+ * 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.util;
+
+/**
+ * @version $Revision$
+ */
+public class IOHelper {
+
+    public static String getDefaultDataDirectory() {
+        return getDefaultDirectoryPrefix() + "activemq-data";
+    }
+
+    public static String getDefaultStoreDirectory() {
+        return getDefaultDirectoryPrefix() + "amqstore";
+    }
+
+    /**
+     * Allows a system property to be used to overload the default data directory
+     * which can be useful for forcing the test cases to use a target/ prefix
+     */
+    public static String getDefaultDirectoryPrefix() {
+        try {
+            return System.getProperty("org.apache.activemq.default.directory.prefix", "");
+        }
+        catch (Exception e) {
+            return "";
+        }
+    }
+}

Propchange: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/util/IOHelper.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/util/IOHelper.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/util/IOHelper.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/ft/TransactedTopicMasterSlaveTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/ft/TransactedTopicMasterSlaveTest.java?view=diff&rev=511947&r1=511946&r2=511947
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/ft/TransactedTopicMasterSlaveTest.java
(original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/ft/TransactedTopicMasterSlaveTest.java
Mon Feb 26 11:01:22 2007
@@ -39,7 +39,7 @@
         // this will create the main (or master broker)
         broker=createBroker();
         broker.start();
-        KahaPersistenceAdapter adaptor=new KahaPersistenceAdapter(new File("activemq-data/slave"));
+        KahaPersistenceAdapter adaptor=new KahaPersistenceAdapter(new File("target/test-amq-data/slave"));
         slave = new BrokerService();
         slave.setBrokerName("slave");
         slave.setPersistenceAdapter(adaptor);
@@ -66,7 +66,7 @@
     protected BrokerService createBroker() throws Exception,URISyntaxException{
         BrokerService broker=new BrokerService();
         broker.setBrokerName("master");
-        KahaPersistenceAdapter adaptor=new KahaPersistenceAdapter(new File("activemq-data/master"));
+        KahaPersistenceAdapter adaptor=new KahaPersistenceAdapter(new File("target/test-amq-data/master"));
         broker.setPersistenceAdapter(adaptor);
         broker.addConnector("tcp://localhost:62001");
         broker.setDeleteAllMessagesOnStartup(true);

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/region/cursors/KahaCursorDurableTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/region/cursors/KahaCursorDurableTest.java?view=diff&rev=511947&r1=511946&r2=511947
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/region/cursors/KahaCursorDurableTest.java
(original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/region/cursors/KahaCursorDurableTest.java
Mon Feb 26 11:01:22 2007
@@ -32,7 +32,7 @@
     
 
     protected void configureBroker(BrokerService answer) throws Exception{
-        KahaPersistenceAdapter adaptor = new KahaPersistenceAdapter(new File("activemq-data/durableTest"));
+        KahaPersistenceAdapter adaptor = new KahaPersistenceAdapter(new File("target/test-amq-data/durableTest"));
         answer.setPersistenceAdapter(adaptor);
         answer.addConnector(bindAddress);
         answer.setDeleteAllMessagesOnStartup(true);

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/region/cursors/KahaQueueStoreTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/region/cursors/KahaQueueStoreTest.java?view=diff&rev=511947&r1=511946&r2=511947
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/region/cursors/KahaQueueStoreTest.java
(original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/region/cursors/KahaQueueStoreTest.java
Mon Feb 26 11:01:22 2007
@@ -35,7 +35,7 @@
     
 
     protected void configureBroker(BrokerService answer) throws Exception{
-        KahaPersistenceAdapter adaptor = new KahaPersistenceAdapter(new File("activemq-data/durableTest"));
+        KahaPersistenceAdapter adaptor = new KahaPersistenceAdapter(new File("target/test-amq-data/durableTest"));
         answer.setPersistenceAdapter(adaptor);
         PolicyEntry policy = new PolicyEntry();
         policy.setPendingQueuePolicy(new StorePendingQueueMessageStoragePolicy());

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/JmsDurableTopicSlowReceiveTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/JmsDurableTopicSlowReceiveTest.java?view=diff&rev=511947&r1=511946&r2=511947
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/JmsDurableTopicSlowReceiveTest.java
(original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/JmsDurableTopicSlowReceiveTest.java
Mon Feb 26 11:01:22 2007
@@ -84,7 +84,7 @@
     }
 
     protected void configureBroker(BrokerService answer) throws Exception{
-        //KahaPersistenceAdapter adapter=new KahaPersistenceAdapter(new File("activemq-data/durableTest"));
+        //KahaPersistenceAdapter adapter=new KahaPersistenceAdapter(new File("target/test-amq-data/durableTest"));
         //JDBCPersistenceAdapter adapter = new JDBCPersistenceAdapter();
        // answer.setPersistenceAdapter(adapter);
         answer.setDeleteAllMessagesOnStartup(true);

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/kaha/impl/index/hash/HashTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/kaha/impl/index/hash/HashTest.java?view=diff&rev=511947&r1=511946&r2=511947
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/kaha/impl/index/hash/HashTest.java
(original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/kaha/impl/index/hash/HashTest.java
Mon Feb 26 11:01:22 2007
@@ -20,6 +20,7 @@
 import org.apache.activemq.kaha.Store;
 import org.apache.activemq.kaha.impl.index.IndexItem;
 import org.apache.activemq.kaha.impl.index.IndexManager;
+import org.apache.activemq.util.IOHelper;
 
 /**
  * Test a HashIndex
@@ -39,7 +40,7 @@
      */
     protected void setUp() throws Exception{
         super.setUp();
-        directory=new File("activemq-data");
+        directory=new File(IOHelper.getDefaultDataDirectory());
         directory.mkdirs();
         indexManager=new IndexManager(directory,"im-hash-test","rw",null);
         this.hashIndex=new HashIndex(directory,"testHash",indexManager);

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/perf/AMQStoreDurableTopicTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/perf/AMQStoreDurableTopicTest.java?view=diff&rev=511947&r1=511946&r2=511947
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/perf/AMQStoreDurableTopicTest.java
(original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/perf/AMQStoreDurableTopicTest.java
Mon Feb 26 11:01:22 2007
@@ -26,7 +26,7 @@
 
    
     protected void configureBroker(BrokerService answer) throws Exception{
-        File dataFileDir=new File("activemq-data/perfTest/amqdb");
+        File dataFileDir=new File("target/test-amq-data/perfTest/amqdb");
         AMQPersistenceAdapter adaptor = new AMQPersistenceAdapter();
         adaptor.setDirectory(dataFileDir);
         answer.setPersistenceAdapter(adaptor);

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/perf/AMQStoreQueueTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/perf/AMQStoreQueueTest.java?view=diff&rev=511947&r1=511946&r2=511947
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/perf/AMQStoreQueueTest.java
(original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/perf/AMQStoreQueueTest.java
Mon Feb 26 11:01:22 2007
@@ -29,7 +29,7 @@
         
     protected void configureBroker(BrokerService answer) throws Exception{
         
-    	File dataFileDir = new File("activemq-data/perfTest/amq");
+    	File dataFileDir = new File("target/test-amq-data/perfTest/amq");
     	
         AMQPersistenceAdapter adaptor = new AMQPersistenceAdapter();
         adaptor.setDirectory(dataFileDir);

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/perf/JournalKahaDurableTopicTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/perf/JournalKahaDurableTopicTest.java?view=diff&rev=511947&r1=511946&r2=511947
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/perf/JournalKahaDurableTopicTest.java
(original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/perf/JournalKahaDurableTopicTest.java
Mon Feb 26 11:01:22 2007
@@ -31,7 +31,7 @@
     
 protected void configureBroker(BrokerService answer) throws Exception{
         
-        File dataFileDir = new File("activemq-data/perfTest");
+        File dataFileDir = new File("target/test-amq-data/perfTest");
         File journalDir = new File(dataFileDir, "journal").getCanonicalFile();
         JournalImpl journal = new JournalImpl(journalDir, 3, 1024*1024*20);
         

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/perf/JournalKahaQueueTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/perf/JournalKahaQueueTest.java?view=diff&rev=511947&r1=511946&r2=511947
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/perf/JournalKahaQueueTest.java
(original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/perf/JournalKahaQueueTest.java
Mon Feb 26 11:01:22 2007
@@ -31,7 +31,7 @@
         
     protected void configureBroker(BrokerService answer) throws Exception{
         
-    	File dataFileDir = new File("activemq-data/perfTest");
+    	File dataFileDir = new File("target/test-amq-data/perfTest");
         File journalDir = new File(dataFileDir, "journal").getCanonicalFile();
         JournalImpl journal = new JournalImpl(journalDir, 3, 1024*1024*20);
     	

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/perf/KahaDurableTopicTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/perf/KahaDurableTopicTest.java?view=diff&rev=511947&r1=511946&r2=511947
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/perf/KahaDurableTopicTest.java
(original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/perf/KahaDurableTopicTest.java
Mon Feb 26 11:01:22 2007
@@ -37,7 +37,7 @@
     */
     
     protected void configureBroker(BrokerService answer) throws Exception{
-        KahaPersistenceAdapter adaptor = new KahaPersistenceAdapter(new File("activemq-data/perfTest"));
+        KahaPersistenceAdapter adaptor = new KahaPersistenceAdapter(new File("target/test-amq-data/perfTest"));
         answer.setPersistenceAdapter(adaptor);
         answer.addConnector(bindAddress);
         answer.setDeleteAllMessagesOnStartup(true);

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/perf/KahaQueueTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/perf/KahaQueueTest.java?view=diff&rev=511947&r1=511946&r2=511947
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/perf/KahaQueueTest.java
(original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/perf/KahaQueueTest.java
Mon Feb 26 11:01:22 2007
@@ -30,7 +30,7 @@
     
         
     protected void configureBroker(BrokerService answer) throws Exception{
-        KahaPersistenceAdapter adaptor = new KahaPersistenceAdapter(new File("activemq-data/perfTest"));
+        KahaPersistenceAdapter adaptor = new KahaPersistenceAdapter(new File("target/test-amq-data/perfTest"));
         answer.setPersistenceAdapter(adaptor);
         answer.addConnector(bindAddress);
         answer.setDeleteAllMessagesOnStartup(true);

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/perf/QueueConnectionMemoryTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/perf/QueueConnectionMemoryTest.java?view=diff&rev=511947&r1=511946&r2=511947
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/perf/QueueConnectionMemoryTest.java
(original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/perf/QueueConnectionMemoryTest.java
Mon Feb 26 11:01:22 2007
@@ -56,7 +56,7 @@
     }
     
     protected void configureBroker(BrokerService answer) throws Exception{
-        KahaPersistenceAdapter adaptor = new KahaPersistenceAdapter(new File("activemq-data/perfTest"));
+        KahaPersistenceAdapter adaptor = new KahaPersistenceAdapter(new File("target/test-amq-data/perfTest"));
         answer.setPersistenceAdapter(adaptor);
         answer.addConnector(bindAddress);
         answer.setDeleteAllMessagesOnStartup(true);

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/perf/QuickStoreDurableTopicTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/perf/QuickStoreDurableTopicTest.java?view=diff&rev=511947&r1=511946&r2=511947
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/perf/QuickStoreDurableTopicTest.java
(original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/perf/QuickStoreDurableTopicTest.java
Mon Feb 26 11:01:22 2007
@@ -25,7 +25,7 @@
 
    
     protected void configureBroker(BrokerService answer) throws Exception{
-        File dataFileDir=new File("activemq-data/perfTest");
+        File dataFileDir=new File("target/test-amq-data/perfTest");
         QuickPersistenceAdapter adaptor=new QuickPersistenceAdapter();
         adaptor.setDirectory(dataFileDir);
         answer.setPersistenceAdapter(adaptor);

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/perf/QuickStoreQueueTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/perf/QuickStoreQueueTest.java?view=diff&rev=511947&r1=511946&r2=511947
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/perf/QuickStoreQueueTest.java
(original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/perf/QuickStoreQueueTest.java
Mon Feb 26 11:01:22 2007
@@ -29,7 +29,7 @@
         
     protected void configureBroker(BrokerService answer) throws Exception{
         
-    	File dataFileDir = new File("activemq-data/perfTest");
+    	File dataFileDir = new File("target/test-amq-data/perfTest");
     	
         QuickPersistenceAdapter adaptor = new QuickPersistenceAdapter();
         adaptor.setDirectory(dataFileDir);

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/perf/RapidStoreQueueTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/perf/RapidStoreQueueTest.java?view=diff&rev=511947&r1=511946&r2=511947
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/perf/RapidStoreQueueTest.java
(original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/perf/RapidStoreQueueTest.java
Mon Feb 26 11:01:22 2007
@@ -29,7 +29,7 @@
         
     protected void configureBroker(BrokerService answer) throws Exception{
         
-    	File dataFileDir = new File("activemq-data/perfTest");
+    	File dataFileDir = new File("target/test-amq-data/perfTest");
         File journalDir = new File(dataFileDir, "journal").getCanonicalFile();
         JournalImpl journal = new JournalImpl(journalDir, 3, 1024*1024*20);
     	

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/PublishOnQueueConsumedMessageInTransactionTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/PublishOnQueueConsumedMessageInTransactionTest.java?view=diff&rev=511947&r1=511946&r2=511947
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/PublishOnQueueConsumedMessageInTransactionTest.java
(original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/PublishOnQueueConsumedMessageInTransactionTest.java
Mon Feb 26 11:01:22 2007
@@ -19,6 +19,7 @@
 
 import junit.framework.TestCase;
 import org.apache.activemq.ActiveMQConnectionFactory;
+import org.apache.activemq.util.IOHelper;
 import org.apache.activemq.command.ActiveMQQueue;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
@@ -45,7 +46,7 @@
     private List messages = createConcurrentList();
     private final Object lock = new Object();
     private String[] data;
-    private String DATAFILE_ROOT =  "activemq-data";
+    private String DATAFILE_ROOT = IOHelper.getDefaultDataDirectory();
     private int messageCount = 3;
     private String url = "vm://localhost";
 

Modified: activemq/trunk/activemq-core/src/test/resources/org/apache/activemq/perf/kahaBroker.xml
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/resources/org/apache/activemq/perf/kahaBroker.xml?view=diff&rev=511947&r1=511946&r2=511947
==============================================================================
--- activemq/trunk/activemq-core/src/test/resources/org/apache/activemq/perf/kahaBroker.xml
(original)
+++ activemq/trunk/activemq-core/src/test/resources/org/apache/activemq/perf/kahaBroker.xml
Mon Feb 26 11:01:22 2007
@@ -23,7 +23,7 @@
       <transportConnector uri="tcp://localhost:61616"/>
     </transportConnectors>
     <persistenceAdapter>
-      <kahaPersistenceAdapter dir = "activemq-data"/>
+      <kahaPersistenceAdapter dir = "target/activemq-data"/>
     </persistenceAdapter>
   </broker>
 



Mime
View raw message