You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Carsten Otto (Jira)" <ji...@apache.org> on 2020/03/12 12:27:00 UTC

[jira] [Updated] (SUREFIRE-1761) Test failure with runOrder / class hierarchy / TestNG / @DirtiesContext

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

Carsten Otto updated SUREFIRE-1761:
-----------------------------------
    Component/s: TestNG support

> Test failure with runOrder / class hierarchy / TestNG / @DirtiesContext
> -----------------------------------------------------------------------
>
>                 Key: SUREFIRE-1761
>                 URL: https://issues.apache.org/jira/browse/SUREFIRE-1761
>             Project: Maven Surefire
>          Issue Type: Bug
>          Components: TestNG support
>    Affects Versions: 2.22.2, 3.0.0-M4
>            Reporter: Carsten Otto
>            Priority: Major
>
> Up front, I don't know if this is a Maven Surefire bug, or something in Spring (see [https://github.com/spring-projects/spring-framework/issues/24685])
> {code}
> <spring.version>5.2.4.RELEASE</spring.version>
> <testng.version>7.1.0</testng.version>
> <maven.compiler.target>1.8</maven.compiler.target>
> <maven.compiler.source>1.8</maven.compiler.source>
> <maven-surefire-plugin.version>2.22.2</maven-surefire-plugin.version>
> {code}
> (Also reproduced with 3.0.0-M4)
> To reproduce: [https://github.com/C-Otto/dirtiescontext]
> I have a Spring, Maven, Java 8, TestNG setup where one test uses {{@DirtiesContext}}. In this VERY specific setup the test fails when I use {{mvn test}}. This seems to be related to the class names and the order in which tests are run.
> Notice that the class {{AbstractClassSomeUnrelatedTest}} does not serve any purpose, but has the same name prefix as the {{abstract}} test class. Changing the name to something else fixes the problem.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)