diff --git a/CHANGES.txt b/CHANGES.txt index 33a15bea196..31716f88d96 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -378,6 +378,7 @@ Release 0.21.0 - Unreleased HBASE-2615 M/R on bulk imported tables HBASE-2676 TestInfoServers should use ephemeral ports HBASE-2616 TestHRegion.testWritesWhileGetting flaky on trunk + HBASE-2684 TestMasterWrongRS flaky in trunk IMPROVEMENTS HBASE-1760 Cleanup TODOs in HTable diff --git a/src/test/java/org/apache/hadoop/hbase/master/TestMasterWrongRS.java b/src/test/java/org/apache/hadoop/hbase/master/TestMasterWrongRS.java index 24e075bbc6d..98b3da13110 100644 --- a/src/test/java/org/apache/hadoop/hbase/master/TestMasterWrongRS.java +++ b/src/test/java/org/apache/hadoop/hbase/master/TestMasterWrongRS.java @@ -53,7 +53,7 @@ public class TestMasterWrongRS { * See HBASE-2613 * @throws Exception */ - @Test + @Test (timeout=180000) public void testRsReportsWrongServerName() throws Exception { MiniHBaseCluster cluster = TEST_UTIL.getHBaseCluster(); MiniHBaseClusterRegionServer firstServer = @@ -62,14 +62,12 @@ public class TestMasterWrongRS { HServerInfo hsi = firstServer.getServerInfo(); firstServer.setHServerInfo(new HServerInfo(hsi.getServerAddress(), hsi.getInfoPort(), hsi.getHostname())); - // Sleep while the region server pings back - Thread.sleep(2000); - assertTrue(firstServer.isOnline()); + + cluster.waitOnRegionServer(0); assertEquals(2, cluster.getLiveRegionServerThreads().size()); secondServer.getHServerInfo().setServerAddress(new HServerAddress("0.0.0.0", 60010)); - Thread.sleep(2000); - assertTrue(secondServer.isOnline()); + cluster.waitOnRegionServer(0); assertEquals(1, cluster.getLiveRegionServerThreads().size()); } }