From f36cb04bf1e1745c049c78a8e62ed37b7188b12b Mon Sep 17 00:00:00 2001 From: Wellington Chevreuil Date: Mon, 9 Aug 2021 14:07:16 +0100 Subject: [PATCH 1/2] HBASE-26184 TestTableSnapshotScanner.testMergeRegion error message is misleading. Change-Id: I51f98cf426edb78138b7b99e076a5cb8c53c6e8e --- .../apache/hadoop/hbase/client/TestTableSnapshotScanner.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestTableSnapshotScanner.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestTableSnapshotScanner.java index 87f7b735bd86..7b675a5676ab 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestTableSnapshotScanner.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestTableSnapshotScanner.java @@ -460,7 +460,7 @@ public void testMergeRegion() throws Exception { } } catch (Exception e) { LOG.error("scan snapshot error", e); - Assert.fail("Should not throw FileNotFoundException"); + Assert.fail("Should not throw Exception: " + e.getMessage()); Assert.assertTrue(e.getCause() != null); Assert.assertTrue(e.getCause().getCause() instanceof FileNotFoundException); } finally { From 27ea8722f165cf1fe5b52d9084f7cf740bbc7d78 Mon Sep 17 00:00:00 2001 From: Wellington Chevreuil Date: Wed, 18 Aug 2021 11:23:14 +0100 Subject: [PATCH 2/2] removing unreachable asserts Change-Id: I009fdfd84fc1eb20ca32990c5d159b95f04dce9a --- .../apache/hadoop/hbase/client/TestTableSnapshotScanner.java | 2 -- 1 file changed, 2 deletions(-) diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestTableSnapshotScanner.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestTableSnapshotScanner.java index 7b675a5676ab..8fc26bbc84d0 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestTableSnapshotScanner.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestTableSnapshotScanner.java @@ -461,8 +461,6 @@ public void testMergeRegion() throws Exception { } catch (Exception e) { LOG.error("scan snapshot error", e); Assert.fail("Should not throw Exception: " + e.getMessage()); - Assert.assertTrue(e.getCause() != null); - Assert.assertTrue(e.getCause().getCause() instanceof FileNotFoundException); } finally { tearDownCluster(); }