HBASE-2684 TestMasterWrongRS flaky in trunk

git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@952837 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Jean-Daniel Cryans 2010-06-08 21:59:13 +00:00
parent fc52e8d359
commit dc641719fa
2 changed files with 5 additions and 6 deletions

View File

@ -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

View File

@ -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());
}
}