Skip to content

Conversation

@marcphilipp
Copy link
Member

For consistency with ClassTemplateInvocationContextProvider and to
make implementations simpler, this commit changes the return type of the
provideTestTemplateInvocationContexts(ExtensionContext) method of the
TestTemplateInvocationContextProvider interface to allow more concrete
Streams to be returned.

This change is source compatible, meaning implementations will still
compile when declaring Stream<TestTemplateInvocationContext> as method
return type. To check for binary compatibility, I used Pioneer's
RetryingTestExtension with a 6.0.0-SNAPSHOT that included this change.
The extension kept working. Nevertheless, I included this change as
potentially breaking in the release notes.

Resolves #3577.


I hereby agree to the terms of the JUnit Contributor License Agreement.


Definition of Done

For consistency with `ClassTemplateInvocationContextProvider` and to
make implementations simpler, this commit changes the return type of the
`provideTestTemplateInvocationContexts(ExtensionContext)` method of the
`TestTemplateInvocationContextProvider` interface to allow more concrete
`Streams` to be returned.

This change is source compatible, meaning implementations will still
compile when declaring `Stream<TestTemplateInvocationContext>` as method
return type. To check for binary compatibility, I used Pioneer's
`RetryingTestExtension` with a 6.0.0-SNAPSHOT that included this change.
The extension kept working. Nevertheless, I included this change as
potentially breaking in the release notes.

Resolves #3577.
@marcphilipp marcphilipp merged commit eaf5ae9 into main Jul 10, 2025
14 checks passed
@marcphilipp marcphilipp deleted the marc/3577-test-template-invocation-context-stream-type branch July 10, 2025 14:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Change return type to Stream<? extends TestTemplateInvocationContext>

3 participants