You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by ap...@apache.org on 2017/11/08 17:43:34 UTC

[5/8] hbase git commit: HBASE-19194 TestRSGroupsBase has some always false checks

HBASE-19194 TestRSGroupsBase has some always false checks


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/47304efd
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/47304efd
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/47304efd

Branch: refs/heads/branch-2
Commit: 47304efd7cb871d94e64ee7a9424c88dd13a7a7c
Parents: a6d8023
Author: Andrew Purtell <ap...@apache.org>
Authored: Tue Nov 7 15:53:25 2017 -0800
Committer: Andrew Purtell <ap...@apache.org>
Committed: Wed Nov 8 09:33:34 2017 -0800

----------------------------------------------------------------------
 .../org/apache/hadoop/hbase/rsgroup/TestRSGroupsBase.java    | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/47304efd/hbase-rsgroup/src/test/java/org/apache/hadoop/hbase/rsgroup/TestRSGroupsBase.java
----------------------------------------------------------------------
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 b225dad..6aa3acd 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