Skip to content

Commit b88ae63

Browse files
committed
Issue jetty#11803 - support testng with maven-surefire-plugin
1 parent 9e9ed21 commit b88ae63

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

jetty-core/jetty-io/pom.xml

+16
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,22 @@
5555
<argLine>@{argLine} ${jetty.surefire.argLine}
5656
--add-reads org.eclipse.jetty.io=org.eclipse.jetty.logging</argLine>
5757
</configuration>
58+
<dependencies>
59+
<!--
60+
surefire plugin currently does not support junit5 with testng out of the box: https://maven.apache.org/surefire/maven-surefire-plugin/examples/testng.html#running-testng-and-junit-tests
61+
We need to specify providers explicitly: https://maven.apache.org/surefire/maven-surefire-plugin/examples/providers.html
62+
-->
63+
<dependency>
64+
<groupId>org.apache.maven.surefire</groupId>
65+
<artifactId>surefire-junit-platform</artifactId>
66+
<version>${maven.surefire.plugin.version}</version>
67+
</dependency>
68+
<dependency>
69+
<groupId>org.apache.maven.surefire</groupId>
70+
<artifactId>surefire-testng</artifactId>
71+
<version>${maven.surefire.plugin.version}</version>
72+
</dependency>
73+
</dependencies>
5874
</plugin>
5975
</plugins>
6076
</build>

jetty-core/jetty-io/src/test/java/org/eclipse/jetty/io/content/ContentSourcePublisherTest.java

+2
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@
2121
import org.eclipse.jetty.io.Content;
2222
import org.reactivestreams.tck.TestEnvironment;
2323
import org.reactivestreams.tck.flow.FlowPublisherVerification;
24+
import org.testng.annotations.Test;
2425

26+
@Test
2527
public final class ContentSourcePublisherTest extends FlowPublisherVerification<Content.Chunk>
2628
{
2729
public ContentSourcePublisherTest()

0 commit comments

Comments
 (0)