HBASE-9074 TestAdmin.testMoveToPreviouslyAssignedRS fails

git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1508212 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
jxiang 2013-07-29 22:15:32 +00:00
parent d7810cdbfa
commit 1fc559c37b
1 changed files with 3 additions and 1 deletions

View File

@ -1555,7 +1555,7 @@ public class TestAdmin {
}
@Test
public void testMoveToPreviouslyAssignedRS() throws IOException {
public void testMoveToPreviouslyAssignedRS() throws IOException, InterruptedException {
byte[] tableName = Bytes.toBytes("testMoveToPreviouslyAssignedRS");
MiniHBaseCluster cluster = TEST_UTIL.getHBaseCluster();
HMaster master = cluster.getMaster();
@ -1563,6 +1563,8 @@ public class TestAdmin {
List<HRegionInfo> tableRegions = localAdmin.getTableRegions(tableName);
HRegionInfo hri = tableRegions.get(0);
AssignmentManager am = master.getAssignmentManager();
assertTrue("Region " + hri.getRegionNameAsString()
+ " should be assigned properly", am.waitForAssignment(hri));
ServerName server = am.getRegionStates().getRegionServerOfRegion(hri);
localAdmin.move(hri.getEncodedNameAsBytes(), Bytes.toBytes(server.getServerName()));
assertEquals("Current region server and region server before move should be same.", server,