HBASE-17806 TestRSGroups#testMoveServersAndTables is flaky in master branch (Guangxu Cheng)
This commit is contained in:
parent
5b4bb8217d
commit
4088f822a4
|
@ -132,6 +132,9 @@ public class RSGroupInfo {
|
|||
sb.append(", ");
|
||||
sb.append(" Servers:");
|
||||
sb.append(this.servers);
|
||||
sb.append(", ");
|
||||
sb.append(" Tables:");
|
||||
sb.append(this.tables);
|
||||
return sb.toString();
|
||||
|
||||
}
|
||||
|
|
|
@ -694,6 +694,7 @@ public abstract class TestRSGroupsBase {
|
|||
|
||||
@Test
|
||||
public void testMoveServersAndTables() throws Exception {
|
||||
LOG.info("testMoveServersAndTables");
|
||||
final RSGroupInfo newGroup = addGroup(getGroupName(name.getMethodName()), 1);
|
||||
//create table
|
||||
final byte[] familyNameBytes = Bytes.toBytes("f");
|
||||
|
@ -718,6 +719,12 @@ public abstract class TestRSGroupsBase {
|
|||
}
|
||||
}
|
||||
|
||||
LOG.debug("Print group info : " + rsGroupAdmin.listRSGroups());
|
||||
int oldDefaultGroupServerSize =
|
||||
rsGroupAdmin.getRSGroupInfo(RSGroupInfo.DEFAULT_GROUP).getServers().size();
|
||||
int oldDefaultGroupTableSize =
|
||||
rsGroupAdmin.getRSGroupInfo(RSGroupInfo.DEFAULT_GROUP).getTables().size();
|
||||
|
||||
//test fail bogus server move
|
||||
try {
|
||||
rsGroupAdmin.moveServersAndTables(Sets.newHashSet(Address.fromString("foo:9999")),
|
||||
|
@ -742,9 +749,9 @@ public abstract class TestRSGroupsBase {
|
|||
}
|
||||
|
||||
//verify default group info
|
||||
Assert.assertEquals(3,
|
||||
Assert.assertEquals(oldDefaultGroupServerSize,
|
||||
rsGroupAdmin.getRSGroupInfo(RSGroupInfo.DEFAULT_GROUP).getServers().size());
|
||||
Assert.assertEquals(4,
|
||||
Assert.assertEquals(oldDefaultGroupTableSize,
|
||||
rsGroupAdmin.getRSGroupInfo(RSGroupInfo.DEFAULT_GROUP).getTables().size());
|
||||
|
||||
//verify new group info
|
||||
|
|
Loading…
Reference in New Issue