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 2024/04/29 09:16:10 UTC

(hbase) branch branch-2.4 updated: HBASE-28405 Addendum use splitRegionAsync().get to get the split exception in tests

This is an automated email from the ASF dual-hosted git repository.

zhangduo pushed a commit to branch branch-2.4
in repository https://gitbox.apache.org/repos/asf/hbase.git


The following commit(s) were added to refs/heads/branch-2.4 by this push:
     new 0892ab50bb5 HBASE-28405 Addendum use splitRegionAsync().get to get the split exception in tests
0892ab50bb5 is described below

commit 0892ab50bb557bbc85698d27cf41704dd6589c5e
Author: Duo Zhang <zh...@apache.org>
AuthorDate: Mon Apr 29 16:52:51 2024 +0800

    HBASE-28405 Addendum use splitRegionAsync().get to get the split exception in tests
    
    (cherry picked from commit a456bfb142e48d8d00a17d5a6f871322710d88e7)
---
 .../org/apache/hadoop/hbase/namespace/TestNamespaceAuditor.java     | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/namespace/TestNamespaceAuditor.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/namespace/TestNamespaceAuditor.java
index 655da57a28e..21e8d821d0a 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/namespace/TestNamespaceAuditor.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/namespace/TestNamespaceAuditor.java
@@ -37,7 +37,6 @@ import org.apache.hadoop.fs.FileSystem;
 import org.apache.hadoop.fs.Path;
 import org.apache.hadoop.hbase.Coprocessor;
 import org.apache.hadoop.hbase.CoprocessorEnvironment;
-import org.apache.hadoop.hbase.DoNotRetryIOException;
 import org.apache.hadoop.hbase.HBaseClassTestRule;
 import org.apache.hadoop.hbase.HBaseTestingUtility;
 import org.apache.hadoop.hbase.HColumnDescriptor;
@@ -403,9 +402,10 @@ public class TestNamespaceAuditor {
     Collections.sort(hris, RegionInfo.COMPARATOR);
     // verify that we cannot split
     try {
-      ADMIN.split(tableTwo, Bytes.toBytes("6"));
+      ADMIN.splitRegionAsync(hris.get(1).getRegionName(), Bytes.toBytes("6")).get(10,
+        TimeUnit.SECONDS);
       fail();
-    } catch (DoNotRetryIOException e) {
+    } catch (ExecutionException e) {
       // Expected
     }
     Thread.sleep(2000);