[infinispan-issues] [JBoss JIRA] (ISPN-5500) BeforeClass methods in LevelDB tests randomly fail to run in JUnit - TestNG wrapper

Dan Berindei (JIRA) issues at jboss.org
Mon May 25 11:21:19 EDT 2015


    [ https://issues.jboss.org/browse/ISPN-5500?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13070758#comment-13070758 ] 

Dan Berindei commented on ISPN-5500:
------------------------------------

Looks like this is a bug in TestNG, which ignores the `alwaysRun = true` attribute on `@BeforeX` annotations. The PR was already integrated, so it should be in TestNG version 6.9.5: https://github.com/cbeust/testng/issues/420

The bug only manifests itself in Arquillian tests because Arquillian tries to instantiate the container(s) in `@BeforeSuite`, which is invoked before all the other configuration methods. If Arquillian fails to initialize (e.g. because `$jbossHome` isn't defined), then none of the other `@BeforeX` methods will run, but `@AfterX` methods will still run (and in this case, fail).

> BeforeClass methods in LevelDB tests randomly fail to run in JUnit - TestNG wrapper
> -----------------------------------------------------------------------------------
>
>                 Key: ISPN-5500
>                 URL: https://issues.jboss.org/browse/ISPN-5500
>             Project: Infinispan
>          Issue Type: Bug
>          Components: Test Suite - Core
>            Reporter: Tomas Sykora
>            Assignee: Tomas Sykora
>              Labels: test_suite
>
> Randomly fails in Jenkins (various environments and jvms).
> We run these tests in containers (Wildfly, Tomcat) using Arquillian. We use JUnit and wrapper that runs these TestNG tests in containers. 
> However, we experience randomly occuring difficulties in Jenkins -- methods annoted by BeforeClass annotation are not run.
> Direct initialization of temp directories needed for LevelDB tests should suffice. 



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


More information about the infinispan-issues mailing list