hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject svn commit: r1327686 - in /hbase/trunk/src/test/java/org/apache/hadoop/hbase/regionserver/wal: HLogPerformanceEvaluation.java TestHLog.java
Date Wed, 18 Apr 2012 21:21:37 GMT
Author: stack
Date: Wed Apr 18 21:21:37 2012
New Revision: 1327686

URL: http://svn.apache.org/viewvc?rev=1327686&view=rev
Log:
HBASE-5825 TestHLog not running any tests; fix

Modified:
    hbase/trunk/src/test/java/org/apache/hadoop/hbase/regionserver/wal/HLogPerformanceEvaluation.java
    hbase/trunk/src/test/java/org/apache/hadoop/hbase/regionserver/wal/TestHLog.java

Modified: hbase/trunk/src/test/java/org/apache/hadoop/hbase/regionserver/wal/HLogPerformanceEvaluation.java
URL: http://svn.apache.org/viewvc/hbase/trunk/src/test/java/org/apache/hadoop/hbase/regionserver/wal/HLogPerformanceEvaluation.java?rev=1327686&r1=1327685&r2=1327686&view=diff
==============================================================================
--- hbase/trunk/src/test/java/org/apache/hadoop/hbase/regionserver/wal/HLogPerformanceEvaluation.java
(original)
+++ hbase/trunk/src/test/java/org/apache/hadoop/hbase/regionserver/wal/HLogPerformanceEvaluation.java
Wed Apr 18 21:21:37 2012
@@ -348,8 +348,18 @@ public final class HLogPerformanceEvalua
     return(endTime - startTime);
   }
 
+  /**
+   * The guts of the {@link #main} method.
+   * Call this method to avoid the {@link #main(String[])} System.exit.
+   * @param args
+   * @return errCode
+   * @throws Exception 
+   */
+  static int innerMain(final String [] args) throws Exception {
+    return ToolRunner.run(HBaseConfiguration.create(), new HLogPerformanceEvaluation(), args);
+  }
+
   public static void main(String[] args) throws Exception {
-    int exitCode = ToolRunner.run(HBaseConfiguration.create(), new HLogPerformanceEvaluation(),
args);
-    System.exit(exitCode);
+     System.exit(innerMain(args));
   }
-}
+}
\ No newline at end of file

Modified: hbase/trunk/src/test/java/org/apache/hadoop/hbase/regionserver/wal/TestHLog.java
URL: http://svn.apache.org/viewvc/hbase/trunk/src/test/java/org/apache/hadoop/hbase/regionserver/wal/TestHLog.java?rev=1327686&r1=1327685&r2=1327686&view=diff
==============================================================================
--- hbase/trunk/src/test/java/org/apache/hadoop/hbase/regionserver/wal/TestHLog.java (original)
+++ hbase/trunk/src/test/java/org/apache/hadoop/hbase/regionserver/wal/TestHLog.java Wed Apr
18 21:21:37 2012
@@ -142,7 +142,9 @@ public class TestHLog  {
     // Run the HPE tool with three threads writing 3000 edits each concurrently.
     // When done, verify that all edits were written and that the order in the
     // WALs is of ascending edit sequence ids.
-    HLogPerformanceEvaluation.main(new String [] {"-threads", "3", "-verify", "-iterations",
"3000"});
+    int errCode =
+      HLogPerformanceEvaluation.innerMain(new String [] {"-threads", "3", "-verify", "-iterations",
"3000"});
+    assertEquals(0, errCode);
   }
 
   /**



Mime
View raw message