Author: stack Date: Sat May 1 14:28:58 2010 New Revision: 940039 URL: http://svn.apache.org/viewvc?rev=940039&view=rev Log: Fix the build; Add a noop to TestRegionServerQueue and flip boolean test in TestMasterTransitions
Modified: hadoop/hbase/trunk/core/src/test/java/org/apache/hadoop/hbase/master/TestMasterTransistions.java hadoop/hbase/trunk/core/src/test/java/org/apache/hadoop/hbase/master/TestRegionServerOperationQueue.java Modified: hadoop/hbase/trunk/core/src/test/java/org/apache/hadoop/hbase/master/TestMasterTransistions.java URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/core/src/test/java/org/apache/hadoop/hbase/master/TestMasterTransistions.java?rev=940039&r1=940038&r2=940039&view=diff ============================================================================== --- hadoop/hbase/trunk/core/src/test/java/org/apache/hadoop/hbase/master/TestMasterTransistions.java (original) +++ hadoop/hbase/trunk/core/src/test/java/org/apache/hadoop/hbase/master/TestMasterTransistions.java Sat May 1 14:28:58 2010 @@ -90,7 +90,7 @@ public class TestMasterTransistions { private final int otherServerIndex; private final HRegionInfo hri; private int closeCount = 0; - static final int SERVER_DURATION = 10 * 1000; + static final int SERVER_DURATION = 3 * 1000; static final int CLOSE_DURATION = 1 * 1000; HBase2428Listener(final MiniHBaseCluster c, final HServerAddress metaAddress, @@ -136,7 +136,7 @@ public class TestMasterTransistions { } public void processed(final RegionServerOperation op) { - if (isWantedCloseOperation(op) == null) return; + if (isWantedCloseOperation(op) != null) return; this.done = true; } @@ -207,6 +207,7 @@ public class TestMasterTransistions { // We should not have retried the close more times than it took for the // server shutdown message to exit the delay queue and get processed // (Multiple by two to add in some slop in case of GC or something). + assertTrue(listener.getCloseCount() > 1); assertTrue(listener.getCloseCount() < ((HBase2428Listener.SERVER_DURATION/HBase2428Listener.CLOSE_DURATION) * 2)); Modified: hadoop/hbase/trunk/core/src/test/java/org/apache/hadoop/hbase/master/TestRegionServerOperationQueue.java URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/core/src/test/java/org/apache/hadoop/hbase/master/TestRegionServerOperationQueue.java?rev=940039&r1=940038&r2=940039&view=diff ============================================================================== --- hadoop/hbase/trunk/core/src/test/java/org/apache/hadoop/hbase/master/TestRegionServerOperationQueue.java (original) +++ hadoop/hbase/trunk/core/src/test/java/org/apache/hadoop/hbase/master/TestRegionServerOperationQueue.java Sat May 1 14:28:58 2010 @@ -23,6 +23,7 @@ import java.util.concurrent.atomic.Atomi import org.apache.hadoop.conf.Configuration; import org.junit.After; import org.junit.Before; +import org.junit.Test; /** * Test the queue used to manage RegionServerOperations. @@ -44,4 +45,8 @@ public class TestRegionServerOperationQu @After public void tearDown() throws Exception { } + + @Test + public void testNothing() throws Exception { + } }