Skip to content

Commit d83e5d8

Browse files
authored
Merge branch 'main' into marc/2982-global-read-lock-level-override
2 parents 69a63c3 + 9badb66 commit d83e5d8

File tree

24 files changed

+426
-102
lines changed

24 files changed

+426
-102
lines changed

documentation/src/docs/asciidoc/release-notes/release-notes-6.0.1.adoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ repository on GitHub.
4545
to avoid conflicts with other control characters.
4646
* Fix `IllegalAccessError` thrown when using the Kotlin-specific `assertDoesNotThrow`
4747
assertion.
48+
* Stop reporting discovery issues for synthetic methods, particularly in conjunction with
49+
Kotlin suspend functions.
4850

4951
[[release-notes-6.0.1-junit-jupiter-deprecations-and-breaking-changes]]
5052
==== Deprecations and Breaking Changes

documentation/src/docs/asciidoc/release-notes/release-notes-6.1.0-M1.adoc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ repository on GitHub.
2828

2929
* Support for creating a `ModuleSelector` from a `java.lang.Module` and using
3030
its classloader for test discovery.
31+
* `OpenTestReportGeneratingListener` now supports redirecting XML events to a socket via
32+
the new `junit.platform.reporting.open.xml.socket` configuration parameter. When set to a
33+
port number, events are sent to `127.0.0.1:<port>` instead of being written to a file.
3134
* Allow implementations of `HierarchicalTestEngine` to specify which nodes require the
3235
global read lock by overriding the `Node.isGlobalReadLockRequired()` method to return
3336
`false`.

documentation/src/docs/asciidoc/user-guide/advanced-topics/junit-platform-reporting.adoc

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,15 @@ The listener is auto-registered and can be configured via the following
4242
Enable/disable writing the report; defaults to `false`.
4343
`junit.platform.reporting.open.xml.git.enabled=true|false`::
4444
Enable/disable including information about the Git repository (see https://github.com/ota4j-team/open-test-reporting#git[Git extension schema] of open-test-reporting); defaults to `false`.
45+
`junit.platform.reporting.open.xml.socket=<port>`::
46+
Optional port number to redirect events to a socket instead of a file. When specified, the
47+
listener will connect to `127.0.0.1:<port>` and send the XML events to the socket. The socket
48+
connection is automatically closed when the test execution completes.
4549

4650
If enabled, the listener creates an XML report file named `open-test-report.xml` in the
47-
configured <<junit-platform-reporting-output-directory, output directory>>.
51+
configured <<junit-platform-reporting-output-directory, output directory>>, unless the
52+
`junit.platform.reporting.open.xml.socket` configuration parameter is set, in which case the
53+
events are sent to the specified socket instead.
4854

4955
If <<running-tests-capturing-output, output capturing>> is enabled, the captured output
5056
written to `System.out` and `System.err` will be included in the report as well.

documentation/src/docs/asciidoc/user-guide/running-tests.adoc

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -748,10 +748,12 @@ include::{consoleLauncherDiscoverOptionsFile}[]
748748
===== Executing tests
749749

750750
.Exit Code
751-
NOTE: The `{ConsoleLauncher}` exits with a status code of `1` if any containers or tests
752-
failed. If no tests are discovered and the `--fail-if-no-tests` command-line option is
753-
supplied, the `ConsoleLauncher` exits with a status code of `2`. Otherwise, the exit code
754-
is `0`.
751+
NOTE: On successful runs, the `{ConsoleLauncher}` exits with a status code of `0`.
752+
All non-zero codes indicate an error of some sort. For example, status code `1`
753+
is returned if any containers or tests failed. If no tests are discovered and the
754+
`--fail-if-no-tests` command-line option is supplied, the `ConsoleLauncher` exits
755+
with a status code of `2`. Unexpected or invalid user input yields a status code
756+
of `3`. An exit code of `-1` indicates an unspecified error condition.
755757

756758
----
757759
include::{consoleLauncherExecuteOptionsFile}[]

gradle/libs.versions.toml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[versions]
22
ant = "1.10.15"
33
apiguardian = "1.1.2"
4-
asciidoctorj-pdf = "2.3.21"
4+
asciidoctorj-pdf = "2.3.23"
55
asciidoctor-plugins = "4.0.5" # Check if workaround in documentation.gradle.kts can be removed when upgrading
66
assertj = "3.27.6"
77
bnd = "7.1.0"
@@ -32,14 +32,16 @@ bndlib = { module = "biz.aQute.bnd:biz.aQute.bndlib", version.ref = "bnd" }
3232
checkstyle = { module = "com.puppycrawl.tools:checkstyle", version.ref = "checkstyle" }
3333
classgraph = { module = "io.github.classgraph:classgraph", version = "4.8.184" }
3434
commons-io = { module = "commons-io:commons-io", version = "2.20.0" }
35-
error-prone-contrib = { module = "tech.picnic.error-prone-support:error-prone-contrib", version = "0.25.0" }
35+
error-prone-contrib = { module = "tech.picnic.error-prone-support:error-prone-contrib", version = "0.26.0" }
3636
error-prone-core = { module = "com.google.errorprone:error_prone_core", version = "2.43.0" }
3737
fastcsv = { module = "de.siegmar:fastcsv", version = "4.1.0" }
3838
groovy = { module = "org.apache.groovy:groovy", version = "5.0.2" }
3939
groovy2-bom = { module = "org.codehaus.groovy:groovy-bom", version = "2.5.23" }
4040
hamcrest = { module = "org.hamcrest:hamcrest", version = "3.0" }
4141
jackson-dataformat-yaml = { module = "com.fasterxml.jackson.dataformat:jackson-dataformat-yaml", version.ref = "jackson" }
4242
jackson-module-kotlin = { module = "com.fasterxml.jackson.module:jackson-module-kotlin", version.ref = "jackson" }
43+
jaxb-api = { module = "jakarta.xml.bind:jakarta.xml.bind-api", version = "4.0.4" }
44+
jaxb-runtime = { module = "org.glassfish.jaxb:jaxb-runtime", version = "4.0.6" }
4345
jfrunit = { module = "org.moditect.jfrunit:jfrunit-core", version = "1.0.0.Alpha2" }
4446
jimfs = { module = "com.google.jimfs:jimfs", version = "1.3.1" }
4547
jmh-core = { module = "org.openjdk.jmh:jmh-core", version.ref = "jmh" }
@@ -72,6 +74,7 @@ snapshotTests-xml = { module = "de.skuzzle.test:snapshot-tests-xml", version.ref
7274
spock1 = { module = "org.spockframework:spock-core", version = "1.3-groovy-2.5" }
7375
xmlunit-assertj = { module = "org.xmlunit:xmlunit-assertj3", version.ref = "xmlunit" }
7476
xmlunit-placeholders = { module = "org.xmlunit:xmlunit-placeholders", version.ref = "xmlunit" }
77+
xmlunit-jakarta-jaxb-impl = { module = "org.xmlunit:xmlunit-jakarta-jaxb-impl", version.ref = "xmlunit" }
7578
testingAnnotations = { module = "com.gradle:develocity-testing-annotations", version = "2.0.1" }
7679
woodstox = { module = "com.fasterxml.woodstox:woodstox-core", version = "7.1.1" }
7780

@@ -87,7 +90,7 @@ ktlint-cli = { module = "com.pinterest.ktlint:ktlint-cli", version.ref = "ktlint
8790
[bundles]
8891
ant = ["ant", "ant-junit", "ant-junitlauncher"]
8992
log4j = ["log4j-core", "log4j-jul"]
90-
xmlunit = ["xmlunit-assertj", "xmlunit-placeholders"]
93+
xmlunit = ["xmlunit-assertj", "xmlunit-placeholders", "xmlunit-jakarta-jaxb-impl", "jaxb-api", "jaxb-runtime"]
9194

9295
[plugins]
9396
asciidoctorConvert = { id = "org.asciidoctor.jvm.convert", version.ref = "asciidoctor-plugins" }

gradle/plugins/common/src/main/kotlin/junitbuild.checkstyle-nohttp.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ dependencies {
1515
}
1616
checkstyle("ch.qos.logback:logback-classic") {
1717
version {
18-
require("1.5.18")
18+
require("1.5.19")
1919
}
20-
because("Workaround for CVE-2024-12798 and CVE-2024-12801")
20+
because("Workaround for CVE-2025-11226")
2121
}
2222
}
2323
}

junit-jupiter-api/src/main/java/org/junit/jupiter/api/extension/InvocationInterceptor.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,16 @@
4545
* <p>Consult the documentation in {@link Extension} for details on
4646
* constructor requirements.
4747
*
48+
* <h2>{@code ExtensionContext} Scope</h2>
49+
*
50+
* <p>As of JUnit Jupiter 5.12, this API participates in the
51+
* {@link TestInstantiationAwareExtension} contract. Implementations of this API
52+
* may therefore choose to override
53+
* {@link TestInstantiationAwareExtension#getTestInstantiationExtensionContextScope(ExtensionContext)
54+
* getTestInstantiationExtensionContextScope(ExtensionContext)}. See
55+
* {@link #interceptTestClassConstructor(Invocation, ReflectiveInvocationContext, ExtensionContext)}
56+
* for details.
57+
*
4858
* @since 5.5
4959
* @see Invocation
5060
* @see ReflectiveInvocationContext

junit-jupiter-api/src/main/java/org/junit/jupiter/api/extension/ParameterResolver.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,15 @@
4848
* <p>Consult the documentation in {@link Extension} for details on
4949
* constructor requirements.
5050
*
51+
* <h2>{@code ExtensionContext} Scope</h2>
52+
*
53+
* <p>As of JUnit Jupiter 5.12, this API participates in the
54+
* {@link TestInstantiationAwareExtension} contract. Implementations of this API
55+
* may therefore choose to override
56+
* {@link TestInstantiationAwareExtension#getTestInstantiationExtensionContextScope(ExtensionContext)
57+
* getTestInstantiationExtensionContextScope(ExtensionContext)} to require a
58+
* test-method scoped {@code ExtensionContext}.
59+
*
5160
* @since 5.0
5261
* @see #supportsParameter(ParameterContext, ExtensionContext)
5362
* @see #resolveParameter(ParameterContext, ExtensionContext)

junit-jupiter-api/src/main/java/org/junit/jupiter/api/extension/TestInstanceFactory.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,17 @@
4343
* <p>Consult the documentation in {@link Extension} for details on
4444
* constructor requirements.
4545
*
46+
* <h2>{@code ExtensionContext} Scope</h2>
47+
*
48+
* <p>As of JUnit Jupiter 5.12, this API participates in the
49+
* {@link TestInstantiationAwareExtension} contract. Implementations of this API
50+
* may therefore choose to override
51+
* {@link TestInstantiationAwareExtension#getTestInstantiationExtensionContextScope(ExtensionContext)
52+
* getTestInstantiationExtensionContextScope(ExtensionContext)} to require a
53+
* test-method scoped {@code ExtensionContext}. See
54+
* {@link #createTestInstance(TestInstanceFactoryContext, ExtensionContext)} for
55+
* further details.
56+
*
4657
* @since 5.3
4758
* @see #createTestInstance(TestInstanceFactoryContext, ExtensionContext)
4859
* @see TestInstanceFactoryContext

junit-jupiter-api/src/main/java/org/junit/jupiter/api/extension/TestInstancePostProcessor.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,16 @@
3333
* <p>Consult the documentation in {@link Extension} for details on
3434
* constructor requirements.
3535
*
36+
* <h2>{@code ExtensionContext} Scope</h2>
37+
*
38+
* <p>As of JUnit Jupiter 5.12, this API participates in the
39+
* {@link TestInstantiationAwareExtension} contract. Implementations of this API
40+
* may therefore choose to override
41+
* {@link TestInstantiationAwareExtension#getTestInstantiationExtensionContextScope(ExtensionContext)
42+
* getTestInstantiationExtensionContextScope(ExtensionContext)} to require a
43+
* test-method scoped {@code ExtensionContext}. See
44+
* {@link #postProcessTestInstance(Object, ExtensionContext)} for further details.
45+
*
3646
* @since 5.0
3747
* @see #postProcessTestInstance(Object, ExtensionContext)
3848
* @see TestInstancePreDestroyCallback

0 commit comments

Comments
 (0)