hbase-commits mailing list archives

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

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

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

Modified: hbase/branches/0.94/src/test/java/org/apache/hadoop/hbase/regionserver/wal/HLogPerformanceEvaluation.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.94/src/test/java/org/apache/hadoop/hbase/regionserver/wal/HLogPerformanceEvaluation.java?rev=1327688&r1=1327687&r2=1327688&view=diff
==============================================================================
--- hbase/branches/0.94/src/test/java/org/apache/hadoop/hbase/regionserver/wal/HLogPerformanceEvaluation.java
(original)
+++ hbase/branches/0.94/src/test/java/org/apache/hadoop/hbase/regionserver/wal/HLogPerformanceEvaluation.java
Wed Apr 18 21:22:06 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/branches/0.94/src/test/java/org/apache/hadoop/hbase/regionserver/wal/TestHLog.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.94/src/test/java/org/apache/hadoop/hbase/regionserver/wal/TestHLog.java?rev=1327688&r1=1327687&r2=1327688&view=diff
==============================================================================
--- hbase/branches/0.94/src/test/java/org/apache/hadoop/hbase/regionserver/wal/TestHLog.java
(original)
+++ hbase/branches/0.94/src/test/java/org/apache/hadoop/hbase/regionserver/wal/TestHLog.java
Wed Apr 18 21:22:06 2012
@@ -145,7 +145,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