Skip to content

Commit 200e598

Browse files
jonathan-albrecht-ibmApache9
authored andcommitted
HBASE-27857 Fix timeout exception handling in HBaseClassTestRule. (#5231)
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: Duo Zhang <zhangduo@apache.org> (cherry picked from commit 220eacf)
1 parent 7140c29 commit 200e598

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

hbase-common/src/test/java/org/apache/hadoop/hbase/HBaseClassTestRule.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ public static HBaseClassTestRule forClass(Class<?> clazz) {
162162

163163
@Override
164164
public Statement apply(Statement base, Description description) {
165-
return timeout.apply(systemExitRule.apply(base, description), description);
165+
return systemExitRule.apply(timeout.apply(base, description), description);
166166
}
167167

168168
}

0 commit comments

Comments
 (0)