This is an automated email from the ASF dual-hosted git repository. liyu pushed a commit to branch branch-1 in repository https://gitbox.apache.org/repos/asf/hbase.git
The following commit(s) were added to refs/heads/branch-1 by this push: new 1599a48687 HBASE-26998 TestRegionProcessRowsWithLocks#testProcessExceptionAndRollBack is broken in branch-1 (#4404) 1599a48687 is described below commit 1599a48687f696cf48e47f27881a25a569e64884 Author: Yu Li <l...@apache.org> AuthorDate: Fri May 6 23:38:44 2022 +0800 HBASE-26998 TestRegionProcessRowsWithLocks#testProcessExceptionAndRollBack is broken in branch-1 (#4404) Signed-off-by: Duo Zhang <zhang...@apache.org> --- .../hbase/regionserver/TestRegionProcessRowsWithLocks.java | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestRegionProcessRowsWithLocks.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestRegionProcessRowsWithLocks.java index e4c38e7245..c2a52d3f03 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestRegionProcessRowsWithLocks.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestRegionProcessRowsWithLocks.java @@ -21,6 +21,7 @@ package org.apache.hadoop.hbase.regionserver; import static org.junit.Assert.assertEquals; import com.google.protobuf.Message; +import com.google.protobuf.ServiceException; import java.io.IOException; import java.util.ArrayList; @@ -112,7 +113,7 @@ public class TestRegionProcessRowsWithLocks { util.shutdownMiniCluster(); } - public void prepareTestData() throws Exception { + public void prepareTestData() throws IOException { try { util.getHBaseAdmin().disableTable(TABLE); util.getHBaseAdmin().deleteTable(TABLE); @@ -131,7 +132,7 @@ public class TestRegionProcessRowsWithLocks { } @Test - public void testProcessNormal() throws Throwable { + public void testProcessNormal() throws ServiceException, IOException { prepareTestData(); List<HRegion> regions = util.getHBaseCluster().getRegions(TABLE); HRegion region = regions.get(0); @@ -152,7 +153,7 @@ public class TestRegionProcessRowsWithLocks { } @Test - public void testProcessExceptionAndRollBack() throws Throwable { + public void testProcessExceptionAndRollBack() throws IOException { prepareTestData(); List<HRegion> regions = util.getHBaseCluster().getRegions(TABLE); HRegion region = regions.get(0); @@ -172,7 +173,7 @@ public class TestRegionProcessRowsWithLocks { try { incrementCounter(table); Assert.fail("Should throw IOException."); - } catch (IOException e) { + } catch (ServiceException | IOException e) { } long endMemstoreSize = region.getMemstoreSize(); @@ -184,7 +185,7 @@ public class TestRegionProcessRowsWithLocks { (endFlushableSize - startFlushableSize)); } - private int incrementCounter(Table table) throws Throwable { + private int incrementCounter(Table table) throws ServiceException, IOException { CoprocessorRpcChannel channel = table.coprocessorService(ROW); RowProcessorEndpoint.IncrementCounterProcessor processor = new RowProcessorEndpoint.IncrementCounterProcessor(ROW);