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

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


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

commit 7164476511b6c207016020ba7a2b68e12b361f9f
Author: Duo Zhang <zhang...@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);

Reply via email to