From 4c578601d760d4bb5547f469eea9334a5c83433b Mon Sep 17 00:00:00 2001 From: Jonathan Albrecht Date: Tue, 2 May 2023 11:32:17 -0400 Subject: [PATCH] HBASE-27857 Fix timeout exception handling in HBaseClassTestRule. HBaseClassTestRule applies a timeout and a system exit rule to tests. The timeout rule throws an exception if it hits the timeout threshold. Since the timeout rule is applied after the system exit rule, the system exit rule does not see the exception and does not re-enable the system exit behavior which can cause maven to hang on some tests. This change applies the timeout rule before the system exit rule so that normal system exit can be restored before the surefire forked node is shutdown. Signed-off-by: Jonathan Albrecht --- .../test/java/org/apache/hadoop/hbase/HBaseClassTestRule.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hbase-common/src/test/java/org/apache/hadoop/hbase/HBaseClassTestRule.java b/hbase-common/src/test/java/org/apache/hadoop/hbase/HBaseClassTestRule.java index 59011cfc9cdc..73f5442b6a78 100644 --- a/hbase-common/src/test/java/org/apache/hadoop/hbase/HBaseClassTestRule.java +++ b/hbase-common/src/test/java/org/apache/hadoop/hbase/HBaseClassTestRule.java @@ -162,7 +162,7 @@ public static HBaseClassTestRule forClass(Class clazz) { @Override public Statement apply(Statement base, Description description) { - return timeout.apply(systemExitRule.apply(base, description), description); + return systemExitRule.apply(timeout.apply(base, description), description); } }