You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by zg...@apache.org on 2020/06/21 13:08:36 UTC

[hbase] branch branch-2.2 updated: HBASE-24593 [branch-2.2] Fix the maven compilation failure for nightly build (#1928)

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

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


The following commit(s) were added to refs/heads/branch-2.2 by this push:
     new 24c7a0c  HBASE-24593 [branch-2.2] Fix the maven compilation failure for nightly build (#1928)
24c7a0c is described below

commit 24c7a0c772b0d8324c5927be917d38fbbcee844c
Author: Guanghao Zhang <zg...@apache.org>
AuthorDate: Sun Jun 21 21:08:22 2020 +0800

    HBASE-24593 [branch-2.2] Fix the maven compilation failure for nightly build (#1928)
---
 .../java/org/apache/hadoop/hbase/ipc/TestNettyRpcConnection.java  | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/hbase-client/src/test/java/org/apache/hadoop/hbase/ipc/TestNettyRpcConnection.java b/hbase-client/src/test/java/org/apache/hadoop/hbase/ipc/TestNettyRpcConnection.java
index d04e593..ab75d60 100644
--- a/hbase-client/src/test/java/org/apache/hadoop/hbase/ipc/TestNettyRpcConnection.java
+++ b/hbase-client/src/test/java/org/apache/hadoop/hbase/ipc/TestNettyRpcConnection.java
@@ -19,6 +19,7 @@ package org.apache.hadoop.hbase.ipc;
 
 import static org.hamcrest.CoreMatchers.instanceOf;
 import static org.hamcrest.MatcherAssert.assertThat;
+import static org.junit.Assert.assertThrows;
 import static org.junit.Assert.fail;
 
 import java.io.IOException;
@@ -69,12 +70,9 @@ public class TestNettyRpcConnection {
   @Test
   public void testPrivateMethodExecutedInEventLoop() throws IllegalAccessException {
     // make sure the test is executed with "-ea"
-    try {
+    assertThrows(AssertionError.class, () -> {
       assert false;
-      fail();
-    } catch (AssertionError e) {
-      // expected
-    }
+    });
     for (Method method : NettyRpcConnection.class.getDeclaredMethods()) {
       if (Modifier.isPrivate(method.getModifiers()) && !method.getName().contains("$")) {
         LOG.info("checking {}", method);