From 8d3e7517e6b6fb19ebc88d5e4e078fdfab43d84d Mon Sep 17 00:00:00 2001 From: Norbert Kalmar Date: Thu, 7 Mar 2019 11:56:10 +0100 Subject: [PATCH] HBASE-21416 - fix TestRegionInfoDisplay flaky test --- .../apache/hadoop/hbase/client/TestRegionInfoDisplay.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/hbase-client/src/test/java/org/apache/hadoop/hbase/client/TestRegionInfoDisplay.java b/hbase-client/src/test/java/org/apache/hadoop/hbase/client/TestRegionInfoDisplay.java index 1a6f2f7d5b1..0800acd4d13 100644 --- a/hbase-client/src/test/java/org/apache/hadoop/hbase/client/TestRegionInfoDisplay.java +++ b/hbase-client/src/test/java/org/apache/hadoop/hbase/client/TestRegionInfoDisplay.java @@ -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)); }