From fd854b1e8dd68312763cc6ece20b4fb806cdb502 Mon Sep 17 00:00:00 2001 From: Andrew Purtell Date: Tue, 7 Nov 2017 15:53:25 -0800 Subject: [PATCH] HBASE-19194 TestRSGroupsBase has some always false checks --- .../org/apache/hadoop/hbase/rsgroup/TestRSGroupsBase.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/hbase-rsgroup/src/test/java/org/apache/hadoop/hbase/rsgroup/TestRSGroupsBase.java b/hbase-rsgroup/src/test/java/org/apache/hadoop/hbase/rsgroup/TestRSGroupsBase.java index b225dadf1a3..6aa3acd1ee2 100644 --- a/hbase-rsgroup/src/test/java/org/apache/hadoop/hbase/rsgroup/TestRSGroupsBase.java +++ b/hbase-rsgroup/src/test/java/org/apache/hadoop/hbase/rsgroup/TestRSGroupsBase.java @@ -418,7 +418,7 @@ public abstract class TestRSGroupsBase { getTableServerRegionMap().get(tableName); final ServerName first = assignMap.entrySet().iterator().next().getKey(); for(RegionInfo region: admin.getTableRegions(tableName)) { - if(!assignMap.get(first).contains(region)) { + if(!assignMap.get(first).contains(region.getRegionNameAsString())) { admin.move(region.getEncodedNameAsBytes(), Bytes.toBytes(first.getServerName())); } } @@ -528,7 +528,11 @@ public abstract class TestRSGroupsBase { }); //verify that targetServer didn't open it - assertFalse(ProtobufUtil.getOnlineRegions(targetRS).contains(targetRegion)); + for (RegionInfo region: ProtobufUtil.getOnlineRegions(targetRS)) { + if (targetRegion.equals(region.getRegionNameAsString())) { + fail("Target server opened region"); + } + } } @Test