You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by zh...@apache.org on 2018/08/30 02:22:59 UTC

hbase git commit: HBASE-21128 TestAsyncRegionAdminApi.testAssignRegionAndUnassignRegion is broken

Repository: hbase
Updated Branches:
  refs/heads/master e903ae5d5 -> 98600f186


HBASE-21128 TestAsyncRegionAdminApi.testAssignRegionAndUnassignRegion is broken


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

Branch: refs/heads/master
Commit: 98600f1860d7bb181456f95b660f95abec91a574
Parents: e903ae5
Author: Duo Zhang <zh...@apache.org>
Authored: Wed Aug 29 18:06:02 2018 +0800
Committer: Duo Zhang <zh...@apache.org>
Committed: Thu Aug 30 10:09:44 2018 +0800

----------------------------------------------------------------------
 .../hadoop/hbase/client/TestAsyncRegionAdminApi.java      | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/98600f18/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestAsyncRegionAdminApi.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestAsyncRegionAdminApi.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestAsyncRegionAdminApi.java
index a8ad424..338db00 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestAsyncRegionAdminApi.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestAsyncRegionAdminApi.java
@@ -17,9 +17,11 @@
  */
 package org.apache.hadoop.hbase.client;
 
+import static org.hamcrest.CoreMatchers.instanceOf;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertNotEquals;
+import static org.junit.Assert.assertThat;
 import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
 
@@ -83,7 +85,13 @@ public class TestAsyncRegionAdminApi extends TestAsyncAdminBase {
 
     // Region is assigned now. Let's assign it again.
     // Master should not abort, and region should stay assigned.
-    admin.assign(hri.getRegionName()).get();
+    try {
+      admin.assign(hri.getRegionName()).get();
+      fail("Should fail when assigning an already onlined region");
+    } catch (ExecutionException e) {
+      // Expected
+      assertThat(e.getCause(), instanceOf(DoNotRetryRegionException.class));
+    }
     try {
       am.waitForAssignment(hri);
       fail("Expected NoSuchProcedureException");