Skip to content

Commit 94ba3f1

Browse files
committed
Merge branch 'main' into marc/5098-package-private-hidden-methods
2 parents cc0ce23 + 984c0c4 commit 94ba3f1

File tree

16 files changed

+420
-67
lines changed

16 files changed

+420
-67
lines changed

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,12 @@ 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.
34+
* Allow implementations of `HierarchicalTestEngine` to specify which nodes require the
35+
global read lock by overriding the `Node.isGlobalReadLockRequired()` method to return
36+
`false`.
3137

3238

3339
[[release-notes-6.1.0-M1-junit-jupiter]]

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.

gradle/libs.versions.toml

Lines changed: 1 addition & 1 deletion
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"

gradle/wrapper/gradle-wrapper.jar

176 Bytes
Binary file not shown.

gradle/wrapper/gradle-wrapper.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionSha256Sum=a17ddd85a26b6a7f5ddb71ff8b05fc5104c0202c6e64782429790c933686c806
4-
distributionUrl=https\://services.gradle.org/distributions/gradle-9.1.0-bin.zip
3+
distributionSha256Sum=df67a32e86e3276d011735facb1535f64d0d88df84fa87521e90becc2d735444
4+
distributionUrl=https\://services.gradle.org/distributions/gradle-9.2.0-bin.zip
55
networkTimeout=10000
66
validateDistributionUrl=true
77
zipStoreBase=GRADLE_USER_HOME

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

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

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,17 @@
3838
* <p>Consult the documentation in {@link Extension} for details on constructor
3939
* requirements.
4040
*
41+
* <h2>{@code ExtensionContext} Scope</h2>
42+
*
43+
* <p>As of JUnit Jupiter 5.12, this API participates in the
44+
* {@link TestInstantiationAwareExtension} contract. Implementations of this API
45+
* may therefore choose to override
46+
* {@link TestInstantiationAwareExtension#getTestInstantiationExtensionContextScope(ExtensionContext)
47+
* getTestInstantiationExtensionContextScope(ExtensionContext)} to require a
48+
* test-method scoped {@code ExtensionContext}. See
49+
* {@link #preConstructTestInstance(TestInstanceFactoryContext, ExtensionContext)}
50+
* for further details.
51+
*
4152
* @since 5.9
4253
* @see TestInstancePreDestroyCallback
4354
* @see TestInstanceFactory

0 commit comments

Comments
 (0)