[ 
https://issues.apache.org/jira/browse/HBASE-27857?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Duo Zhang resolved HBASE-27857.
-------------------------------
    Fix Version/s: 2.6.0
                   3.0.0-alpha-4
                   2.5.5
                   2.4.18
     Hadoop Flags: Reviewed
         Assignee: Jonathan Albrecht
       Resolution: Fixed

Pushed to branch-2.4+.

Thanks [~jonathan.albrecht] for contributing!

> HBaseClassTestRule: system exit not restored if test times out may cause test 
> to hang
> -------------------------------------------------------------------------------------
>
>                 Key: HBASE-27857
>                 URL: https://issues.apache.org/jira/browse/HBASE-27857
>             Project: HBase
>          Issue Type: Bug
>          Components: test
>         Environment: maven unit tests
>            Reporter: Jonathan Albrecht
>            Assignee: Jonathan Albrecht
>            Priority: Minor
>             Fix For: 2.6.0, 3.0.0-alpha-4, 2.5.5, 2.4.18
>
>
> 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 default system exit behavior 
> which can cause maven to hang on some tests. I saw the hang happen when 
> certain tests timed out on s390x but it could happen on any platform.
>  
> If the org.apache.hadoop.hbase.TestTimeout.infiniteLoop test is enabled and 
> run it will generate a *-jvmRun1.dump file which shows that the 
> org.apache.hadoop.hbase.TestSecurityManager is still enabled:
>  
> {quote}# Created at 2023-04-27T15:51:58.947
> org.apache.hadoop.hbase.SystemExitRule$SystemExitInTestException
>         at 
> org.apache.hadoop.hbase.TestSecurityManager.checkExit(TestSecurityManager.java:32)
>         at java.base/java.lang.Runtime.exit(Runtime.java:114)
>         at java.base/java.lang.System.exit(System.java:1752)
>         at 
> org.apache.maven.surefire.booter.ForkedBooter.acknowledgedExit(ForkedBooter.java:381)
>         at 
> org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:178)
>         at 
> org.apache.maven.surefire.booter.ForkedBooter.run(ForkedBooter.java:507)
>         at 
> org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:495)
> ...{quote}
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to