From 9ec484a0310f44987280fd94757485f9859fef2c Mon Sep 17 00:00:00 2001 From: Viraj Jasani Date: Mon, 3 Aug 2020 20:12:25 +0530 Subject: [PATCH] HBASE-24795 : TestRegionMover2#testWithSplitRegions fix (ADDENDUM) --- .../java/org/apache/hadoop/hbase/util/TestRegionMover2.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/util/TestRegionMover2.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/util/TestRegionMover2.java index 743fa99611a..6007fd7b88b 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/util/TestRegionMover2.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/util/TestRegionMover2.java @@ -160,6 +160,9 @@ public class TestRegionMover2 { Assert.assertEquals(0, regionServer.getNumberOfOnlineRegions()); LOG.debug("Successfully Unloaded, now Loading"); HRegion hRegion = hRegions.get(1); + if (hRegion.getRegionInfo().getStartKey().length == 0) { + hRegion = hRegions.get(0); + } int startKey = 0; int endKey = Integer.MAX_VALUE; if (hRegion.getRegionInfo().getStartKey().length > 0) {