You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by te...@apache.org on 2011/08/27 18:09:37 UTC

svn commit: r1162389 - in /hbase/branches/0.90: CHANGES.txt src/test/java/org/apache/hadoop/hbase/regionserver/wal/TestLogRolling.java

Author: tedyu
Date: Sat Aug 27 16:09:37 2011
New Revision: 1162389

URL: http://svn.apache.org/viewvc?rev=1162389&view=rev
Log:
HBASE-4252  TestLogRolling's low-probability failure (Jieshan Bean)

Modified:
    hbase/branches/0.90/CHANGES.txt
    hbase/branches/0.90/src/test/java/org/apache/hadoop/hbase/regionserver/wal/TestLogRolling.java

Modified: hbase/branches/0.90/CHANGES.txt
URL: http://svn.apache.org/viewvc/hbase/branches/0.90/CHANGES.txt?rev=1162389&r1=1162388&r2=1162389&view=diff
==============================================================================
--- hbase/branches/0.90/CHANGES.txt (original)
+++ hbase/branches/0.90/CHANGES.txt Sat Aug 27 16:09:37 2011
@@ -26,6 +26,7 @@ Release 0.90.5 - Unreleased
                HTable(tablename) (Ramkrishna)
    HBASE-4124  ZK restarted while a region is being assigned, new active HM re-assigns
                it but the RS warns 'already online on this server'. (Gao Jinchao)
+   HBASE-4252  TestLogRolling's low-probability failure (Jieshan Bean)
 
   IMPROVEMENT
    HBASE-4205  Enhance HTable javadoc (Eric Charles)

Modified: hbase/branches/0.90/src/test/java/org/apache/hadoop/hbase/regionserver/wal/TestLogRolling.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.90/src/test/java/org/apache/hadoop/hbase/regionserver/wal/TestLogRolling.java?rev=1162389&r1=1162388&r2=1162389&view=diff
==============================================================================
--- hbase/branches/0.90/src/test/java/org/apache/hadoop/hbase/regionserver/wal/TestLogRolling.java (original)
+++ hbase/branches/0.90/src/test/java/org/apache/hadoop/hbase/regionserver/wal/TestLogRolling.java Sat Aug 27 16:09:37 2011
@@ -19,7 +19,10 @@
  */
 package org.apache.hadoop.hbase.regionserver.wal;
 
-import static org.junit.Assert.*;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
 
 import java.io.EOFException;
 import java.io.IOException;
@@ -29,7 +32,6 @@ import java.lang.reflect.Method;
 import java.util.ArrayList;
 import java.util.HashSet;
 import java.util.List;
-import java.util.Map;
 import java.util.Set;
 
 import org.apache.commons.logging.Log;
@@ -376,14 +378,14 @@ public class TestLogRolling  {
     dfsCluster
         .startDataNodes(TEST_UTIL.getConfiguration(), 1, true, null, null);
     dfsCluster.waitActive();
-    // Force roll writer. The new log file will have the defalt replication,
-    // and the lowReplication roller will be enabled.
-    log.rollWriter();
-    batchWriteAndWait(table, 14, true, 10000);
-    assertTrue("LowReplication Roller should've been enabled",
-        log.isLowReplicationRollEnabled());
+    // Force roll writer. The new log file will have the default replications,
+    // and the LowReplication Roller will be enabled.
+    log.rollWriter(true);
+    batchWriteAndWait(table, 13, true, 10000);
     assertTrue("New log file should have the default replication",
         log.getLogReplication() == fs.getDefaultReplication());
+    assertTrue("LowReplication Roller should've been enabled",
+        log.isLowReplicationRollEnabled());
   }
 
   /**