You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by er...@apache.org on 2011/08/20 06:52:42 UTC

svn commit: r1159841 - /james/server/trunk/hbase/src/test/java/org/apache/james/rrt/hbase/HBaseRecipientRewriteTableTest.java

Author: eric
Date: Sat Aug 20 04:52:42 2011
New Revision: 1159841

URL: http://svn.apache.org/viewvc?rev=1159841&view=rev
Log:
Don't launch mini hbase cluster on each test method (JAMES-1273)

Modified:
    james/server/trunk/hbase/src/test/java/org/apache/james/rrt/hbase/HBaseRecipientRewriteTableTest.java

Modified: james/server/trunk/hbase/src/test/java/org/apache/james/rrt/hbase/HBaseRecipientRewriteTableTest.java
URL: http://svn.apache.org/viewvc/james/server/trunk/hbase/src/test/java/org/apache/james/rrt/hbase/HBaseRecipientRewriteTableTest.java?rev=1159841&r1=1159840&r2=1159841&view=diff
==============================================================================
--- james/server/trunk/hbase/src/test/java/org/apache/james/rrt/hbase/HBaseRecipientRewriteTableTest.java (original)
+++ james/server/trunk/hbase/src/test/java/org/apache/james/rrt/hbase/HBaseRecipientRewriteTableTest.java Sat Aug 20 04:52:42 2011
@@ -56,15 +56,17 @@ public class HBaseRecipientRewriteTableT
      */
     public void setUp() throws Exception {
         super.setUp();
-        HBaseTestingUtility htu = new HBaseTestingUtility();
-        htu.getConfiguration().setBoolean("dfs.support.append", true);
-        try {
-            hbaseCluster = htu.startMiniCluster();
-        } 
-        catch (Exception e) {
-            logger.error("Exception when starting HBase Mini Cluster", e);
+        if (hbaseCluster == null) {
+            HBaseTestingUtility htu = new HBaseTestingUtility();
+            htu.getConfiguration().setBoolean("dfs.support.append", true);
+            try {
+                hbaseCluster = htu.startMiniCluster();
+            } 
+            catch (Exception e) {
+                logger.error("Exception when starting HBase Mini Cluster", e);
+            }
+            TablePool.getInstance(getConfiguration());
         }
-        TablePool.getInstance(getConfiguration());
     }
     
     /* (non-Javadoc)
@@ -72,9 +74,6 @@ public class HBaseRecipientRewriteTableT
      */
     public void tearDown() throws Exception {
         super.tearDown();
-       if (hbaseCluster != null) {
-           hbaseCluster.shutdown();
-       }
     }
     
     /* (non-Javadoc)



---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org