Fix Junit Platform 1.13+ Support (up to JUnit Jupiter and Platform to 5.14.2/1.14.2) by chrisrueger · Pull Request #7000 · bndtools/bnd (original) (raw)

@chrisrueger changed the titleCopilot/fix no namespaced hierarchical store Fix Junit Platform 1.13+ Support

Dec 14, 2025

This was referenced

Dec 27, 2025

@chrisrueger chrisrueger changed the titleFix Junit Platform 1.13+ Support Fix Junit Platform 1.13+ Support (up to JUnit Jupiter and Platform to 5.14.1/1.14.1)

Dec 28, 2025

This was referenced

Jan 2, 2026

@chrisrueger

…2/1.14.2)

Add ExecutionRequestFactory to propagate execution context for JUnit Platform 1.13+

Implemented ExecutionRequestFactory that uses reflection to properly propagate the internal NamespacedHierarchicalStore from parent ExecutionRequest to child requests. This is necessary for JUnit Platform 1.13+ compatibility.

The factory:

Updated BundleDescriptor to use the factory instead of directly creating ExecutionRequest.

Updated BundleEngineTest to include ExecutionRequestFactory class in the engine bundle for tests. This class was added in the JUnit Platform 1.13+ compatibility changes but wasn't included in the test bundle setup.

All tests now pass successfully.

Update JUnit Jupiter/Platform versions to 5.11.4/1.11.4

Updated junit.jupiter.version and junit.platform.version to 5.11.4/1.11.4 to test with newer versions. These versions are compatible and all 136 tests pass.

Fix JUnit5 test classes to use static @BeforeAll methods for 5.13+ compatibility

Made @BeforeAll methods static in JUnit5ContainerFailure and JUnit5ContainerError test classes.

In JUnit 5.13+, non-static @BeforeAll methods are now detected as discovery errors (causing DiscoveryIssueException) rather than execution failures. This was causing the exitCode_countsJupiterContainerErrorsAndFailures() test to fail - expecting exit code 2 (two container failures) but getting exit code 1 (discovery error).

Making the @BeforeAll methods static ensures they properly execute and fail as intended by the test, maintaining compatibility with JUnit Platform 1.13+.

fix ConfigVersionsTest

replace deprecated method getParameterTypeNames

Replaces calls to getMethodParameterTypes with getParameterTypeNames when creating and resolving MethodSelectors. This aligns with updated API usage and ensures correct parameter type handling.

Refactor ExecutionRequest to use static create() methods

Replaces use of internal constructors with reflection-based invocation of static create() methods for ExecutionRequest, improving compatibility with JUnit Platform 1.13+ and future versions. This change also updates the logic to detect and use the appropriate static method signatures, and removes reliance on direct constructor access.

Signed-off-by: Christoph Rueger chrisrueger@gmail.com

Update JUnit Jupiter and Platform to 5.14.1/1.14.1

Bump JUnit Jupiter and Platform versions to 5.14.2 and 1.14.2 in cnf/ext/junit.bnd, Gradle, and Maven plugin parent POM to keep dependencies up to date and consistent across the project.

This is the latest version in the 5.x / 1.x range and also the version used by Eclipse

Signed-off-by: Christoph Rueger chrisrueger@gmail.com Co-Authored-By: chrisrueger 188422+chrisrueger@users.noreply.github.com

@chrisrueger chrisrueger changed the titleFix Junit Platform 1.13+ Support (up to JUnit Jupiter and Platform to 5.14.1/1.14.1) Fix Junit Platform 1.13+ Support (up to JUnit Jupiter and Platform to 5.14.2/1.14.2)

Jan 7, 2026

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters

[ Show hidden characters]({{ revealButtonHref }})