[hornetq-commits] JBoss hornetq SVN: r9642 - branches/2_2_0_HA_Improvements/tests/src/org/hornetq/tests/util.

do-not-reply at jboss.org do-not-reply at jboss.org
Fri Sep 3 06:20:17 EDT 2010


Author: jmesnil
Date: 2010-09-03 06:20:17 -0400 (Fri, 03 Sep 2010)
New Revision: 9642

Modified:
   branches/2_2_0_HA_Improvements/tests/src/org/hornetq/tests/util/ServiceTestBase.java
   branches/2_2_0_HA_Improvements/tests/src/org/hornetq/tests/util/UnitTestCase.java
Log:
"static"-ified the dir locations used to create default config

Modified: branches/2_2_0_HA_Improvements/tests/src/org/hornetq/tests/util/ServiceTestBase.java
===================================================================
--- branches/2_2_0_HA_Improvements/tests/src/org/hornetq/tests/util/ServiceTestBase.java	2010-09-03 10:19:04 UTC (rev 9641)
+++ branches/2_2_0_HA_Improvements/tests/src/org/hornetq/tests/util/ServiceTestBase.java	2010-09-03 10:20:17 UTC (rev 9642)
@@ -384,7 +384,7 @@
       return configuration;
    }
 
-   protected Configuration createDefaultConfig(final Map<String, Object> params, final String... acceptors)
+   protected static Configuration createDefaultConfig(final Map<String, Object> params, final String... acceptors)
    {
       Configuration configuration = new ConfigurationImpl();
       configuration.setSecurityEnabled(false);

Modified: branches/2_2_0_HA_Improvements/tests/src/org/hornetq/tests/util/UnitTestCase.java
===================================================================
--- branches/2_2_0_HA_Improvements/tests/src/org/hornetq/tests/util/UnitTestCase.java	2010-09-03 10:19:04 UTC (rev 9641)
+++ branches/2_2_0_HA_Improvements/tests/src/org/hornetq/tests/util/UnitTestCase.java	2010-09-03 10:20:17 UTC (rev 9642)
@@ -95,7 +95,7 @@
 
    // Attributes ----------------------------------------------------
 
-   private final String testDir = System.getProperty("java.io.tmpdir", "/tmp") + "/hornetq-unit-test";
+   private static final String testDir = System.getProperty("java.io.tmpdir", "/tmp") + "/hornetq-unit-test";
 
    // Static --------------------------------------------------------
 
@@ -433,22 +433,24 @@
       recreateDirectory(getLargeMessagesDir(testDir));
       recreateDirectory(getClientLargeMessagesDir(testDir));
       recreateDirectory(getTemporaryDir(testDir));
+      
+      System.out.println("deleted " + testDir);
    }
 
    /**
     * @return the journalDir
     */
-   protected String getJournalDir()
+   protected static String getJournalDir()
    {
       return getJournalDir(testDir);
    }
 
-   protected String getJournalDir(final String testDir)
+   protected static String getJournalDir(final String testDir)
    {
       return testDir + "/journal";
    }
 
-   protected String getJournalDir(final int index, final boolean backup)
+   protected static String getJournalDir(final int index, final boolean backup)
    {
       String dir = getJournalDir(testDir) + index + "-" + (backup ? "B" : "L");
 
@@ -458,7 +460,7 @@
    /**
     * @return the bindingsDir
     */
-   protected String getBindingsDir()
+   protected static String getBindingsDir()
    {
       return getBindingsDir(testDir);
    }
@@ -466,7 +468,7 @@
    /**
     * @return the bindingsDir
     */
-   protected String getBindingsDir(final String testDir)
+   protected static String getBindingsDir(final String testDir)
    {
       return testDir + "/bindings";
    }
@@ -482,7 +484,7 @@
    /**
     * @return the pageDir
     */
-   protected String getPageDir()
+   protected static String getPageDir()
    {
       return getPageDir(testDir);
    }
@@ -490,7 +492,7 @@
    /**
     * @return the pageDir
     */
-   protected String getPageDir(final String testDir)
+   protected static String getPageDir(final String testDir)
    {
       return testDir + "/page";
    }
@@ -503,7 +505,7 @@
    /**
     * @return the largeMessagesDir
     */
-   protected String getLargeMessagesDir()
+   protected static String getLargeMessagesDir()
    {
       return getLargeMessagesDir(testDir);
    }
@@ -511,12 +513,12 @@
    /**
     * @return the largeMessagesDir
     */
-   protected String getLargeMessagesDir(final String testDir)
+   protected static String getLargeMessagesDir(final String testDir)
    {
       return testDir + "/large-msg";
    }
 
-   protected String getLargeMessagesDir(final int index, final boolean backup)
+   protected static String getLargeMessagesDir(final int index, final boolean backup)
    {
       return getLargeMessagesDir(testDir) + index + "-" + (backup ? "B" : "L");
    }



More information about the hornetq-commits mailing list