HBASE-21416 - fix TestRegionInfoDisplay flaky test

This commit is contained in:
Norbert Kalmar 2019-03-07 11:56:10 +01:00 committed by stack
parent 3d269cb37a
commit 8d3e7517e6
1 changed files with 3 additions and 2 deletions

View File

@ -68,12 +68,13 @@ public class TestRegionInfoDisplay {
RegionState state = RegionState.createForTesting(convert(ri), RegionState.State.OPEN);
String descriptiveNameForDisplay =
RegionInfoDisplay.getDescriptiveNameFromRegionStateForDisplay(state, conf);
checkDescriptiveNameEquality(descriptiveNameForDisplay,state.toDescriptiveString(), startKey);
String originalDescriptive = state.toDescriptiveString();
checkDescriptiveNameEquality(descriptiveNameForDisplay, originalDescriptive, startKey);
conf.setBoolean("hbase.display.keys", true);
Assert.assertArrayEquals(endKey, RegionInfoDisplay.getEndKeyForDisplay(ri, conf));
Assert.assertArrayEquals(startKey, RegionInfoDisplay.getStartKeyForDisplay(ri, conf));
Assert.assertEquals(state.toDescriptiveString(),
Assert.assertEquals(originalDescriptive,
RegionInfoDisplay.getDescriptiveNameFromRegionStateForDisplay(state, conf));
}