You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by je...@apache.org on 2013/08/19 20:41:38 UTC
svn commit: r1515552 -
/hbase/branches/0.95/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestDistributedLogSplitting.java
Author: jeffreyz
Date: Mon Aug 19 18:41:38 2013
New Revision: 1515552
URL: http://svn.apache.org/r1515552
Log:
HBASE-8960: TestDistributedLogSplitting - fix testWorkerAbort & testDisallowWritesInRecovering
Modified:
hbase/branches/0.95/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestDistributedLogSplitting.java
Modified: hbase/branches/0.95/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestDistributedLogSplitting.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.95/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestDistributedLogSplitting.java?rev=1515552&r1=1515551&r2=1515552&view=diff
==============================================================================
--- hbase/branches/0.95/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestDistributedLogSplitting.java (original)
+++ hbase/branches/0.95/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestDistributedLogSplitting.java Mon Aug 19 18:41:38 2013
@@ -775,7 +775,7 @@ public class TestDistributedLogSplitting
curConf.setBoolean(HConstants.DISALLOW_WRITES_IN_RECOVERING, true);
startCluster(NUM_RS, curConf);
final int NUM_REGIONS_TO_CREATE = 40;
- final int NUM_LOG_LINES = 20000;
+ final int NUM_LOG_LINES = 30000;
// turn off load balancing to prevent regions from moving around otherwise
// they will consume recovered.edits
master.balanceSwitch(false);
@@ -821,7 +821,16 @@ public class TestDistributedLogSplitting
} catch (IOException ioe) {
Assert.assertTrue(ioe instanceof RetriesExhaustedWithDetailsException);
RetriesExhaustedWithDetailsException re = (RetriesExhaustedWithDetailsException) ioe;
- Assert.assertTrue(re.getCause(0) instanceof RegionInRecoveryException);
+ boolean foundRegionInRecoveryException = false;
+ for (Throwable t : re.getCauses()) {
+ if (t instanceof RegionInRecoveryException) {
+ foundRegionInRecoveryException = true;
+ break;
+ }
+ }
+ Assert.assertTrue(
+ "No RegionInRecoveryException. Following exceptions returned=" + re.getCauses(),
+ foundRegionInRecoveryException);
}
ht.close();
@@ -881,7 +890,7 @@ public class TestDistributedLogSplitting
Thread.yield();
curt = System.currentTimeMillis();
} else {
- assertEquals(1, (tot_wkr_task_resigned.get() + tot_wkr_task_err.get() +
+ assertTrue(1 <= (tot_wkr_task_resigned.get() + tot_wkr_task_err.get() +
tot_wkr_final_transition_failed.get() + tot_wkr_task_done.get() +
tot_wkr_preempt_task.get()));
return;