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

Tibor Digana closed SUREFIRE-1794.
----------------------------------
    Resolution: Cannot Reproduce

Works for the user with the latest 
[commit|https://github.com/apache/maven-surefire/commit/3eb875fc622bde42bff7d998d7d88f1a5c0a7232].

> @TestFactory method succeeds when throwing an exception with Maven Failsafe 
> plugin
> ----------------------------------------------------------------------------------
>
>                 Key: SUREFIRE-1794
>                 URL: https://issues.apache.org/jira/browse/SUREFIRE-1794
>             Project: Maven Surefire
>          Issue Type: Task
>            Reporter: Zhenxu Ke
>            Assignee: Tibor Digana
>            Priority: Major
>
> Hi, this is an issue transferred from 
> [https://github.com/junit-team/junit5/issues/2303]
>  
> h2. Steps to reproduce
> Here is a reproducible test:
>  
> {code:java}
> @TestFactory
>     List<DynamicNode> tests() {
>         int a = 1 / 0;  // intentionally throws
>         return Arrays.asList(
>             DynamicContainer.dynamicContainer(
>                 "dynamic container 1",
>                 Stream.of(
>                     DynamicTest.dynamicTest("dynamic test 1", () -> fail("")),
>                     DynamicTest.dynamicTest("dynamic test 2", () -> fail(""))
>                 )
>             ),
>             DynamicContainer.dynamicContainer(
>                 "dynamic container 2",
>                 Stream.of(
>                     DynamicTest.dynamicTest("dynamic test 3", () -> fail("")),
>                     DynamicTest.dynamicTest("dynamic test 4", () -> fail(""))
>                 )
>             )
>         );
>     }{code}
>  
> the test above succeeded if `{{int a = 1 / 0`}} is present, and failed as 
> expected if I remove it, showing 4 tests executed and all of them failed.
> h2. Context
>  * Used versions (Jupiter/Vintage/Platform):
>  
> {code:java}
> <dependency>
>   <groupId>org.junit.jupiter</groupId>
>   <artifactId>junit-jupiter</artifactId>
>   <version>5.6.0</version>
> </dependency>
> {code}
>  * Build Tool/IDE:
> maven-failsafe-plugin, with all necessary dependencies configured
>  
> {code:java}
>             <plugin>
>                 <groupId>org.apache.maven.plugins</groupId>
>                 <artifactId>maven-failsafe-plugin</artifactId>
>                 <version>3.0.0-M4</version>
>                 <dependencies>
>                     <!-- not important, thus omitted -->
>                 </dependencies>
>             </plugin>
> {code}
> h2. Deliverables
> I'm expecting the tests to be failed if the {{TestFactory}} method throws



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

Reply via email to