From 558f480be534e0fd1e805b8d8612860bfec08b59 Mon Sep 17 00:00:00 2001 From: Marc Philipp Date: Wed, 25 Sep 2024 09:13:39 +0200 Subject: [PATCH 01/10] Back to snapshots for further development --- gradle.properties | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gradle.properties b/gradle.properties index 9a391283fc8a..1f3ab837c07b 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,13 +1,13 @@ group = org.junit -version = 5.11.1 +version = 5.11.2-SNAPSHOT jupiterGroup = org.junit.jupiter platformGroup = org.junit.platform -platformVersion = 1.11.1 +platformVersion = 1.11.2-SNAPSHOT vintageGroup = org.junit.vintage -vintageVersion = 5.11.1 +vintageVersion = 5.11.2-SNAPSHOT # We need more metaspace due to apparent memory leak in Asciidoctor/JRuby # The exports are needed due to https://github.com/diffplug/spotless/issues/834 From 5f52ced83a5065db965cd6f5d30aef201356ce2f Mon Sep 17 00:00:00 2001 From: Marc Philipp Date: Wed, 25 Sep 2024 10:55:24 +0200 Subject: [PATCH 02/10] Fix link to milestone page --- .../src/docs/asciidoc/release-notes/release-notes-5.11.1.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/documentation/src/docs/asciidoc/release-notes/release-notes-5.11.1.adoc b/documentation/src/docs/asciidoc/release-notes/release-notes-5.11.1.adoc index 4160643efd34..80af4a1a53d3 100644 --- a/documentation/src/docs/asciidoc/release-notes/release-notes-5.11.1.adoc +++ b/documentation/src/docs/asciidoc/release-notes/release-notes-5.11.1.adoc @@ -6,7 +6,7 @@ *Scope:* Bug fixes and enhancements since 5.11.0 For a complete list of all _closed_ issues and pull requests for this release, consult the -link:{junit5-repo}+/milestone/79?closed=1+[5.11.1] milestone page in the JUnit repository +link:{junit5-repo}+/milestone/80?closed=1+[5.11.1] milestone page in the JUnit repository on GitHub. From 9658fac066d818024939199985d49b57d6a37763 Mon Sep 17 00:00:00 2001 From: Marc Philipp Date: Wed, 2 Oct 2024 13:15:53 +0200 Subject: [PATCH 03/10] Add initial 5.11.2 release notes from template (cherry picked from commit daec7959e7c0d7dd60109bb088216c91601c5e11) --- .../docs/asciidoc/release-notes/index.adoc | 2 + .../release-notes/release-notes-5.11.2.adoc | 67 +++++++++++++++++++ 2 files changed, 69 insertions(+) create mode 100644 documentation/src/docs/asciidoc/release-notes/release-notes-5.11.2.adoc diff --git a/documentation/src/docs/asciidoc/release-notes/index.adoc b/documentation/src/docs/asciidoc/release-notes/index.adoc index d6ec4117b951..f2d25bf5fbc1 100644 --- a/documentation/src/docs/asciidoc/release-notes/index.adoc +++ b/documentation/src/docs/asciidoc/release-notes/index.adoc @@ -17,6 +17,8 @@ authors as well as build tool and IDE vendors. include::{includedir}/link-attributes.adoc[] +include::{basedir}/release-notes-5.11.2.adoc[] + include::{basedir}/release-notes-5.11.1.adoc[] include::{basedir}/release-notes-5.11.0.adoc[] diff --git a/documentation/src/docs/asciidoc/release-notes/release-notes-5.11.2.adoc b/documentation/src/docs/asciidoc/release-notes/release-notes-5.11.2.adoc new file mode 100644 index 000000000000..36d267b0e339 --- /dev/null +++ b/documentation/src/docs/asciidoc/release-notes/release-notes-5.11.2.adoc @@ -0,0 +1,67 @@ +[[release-notes-5.11.2]] +== 5.11.2 + +*Date of Release:* ❓ + +*Scope:* ❓ + +For a complete list of all _closed_ issues and pull requests for this release, consult the +link:{junit5-repo}+/milestone/82?closed=1+[5.11.2] milestone page in the JUnit repository +on GitHub. + + +[[release-notes-5.11.2-junit-platform]] +=== JUnit Platform + +[[release-notes-5.11.2-junit-platform-bug-fixes]] +==== Bug Fixes + +* ❓ + +[[release-notes-5.11.2-junit-platform-deprecations-and-breaking-changes]] +==== Deprecations and Breaking Changes + +* ❓ + +[[release-notes-5.11.2-junit-platform-new-features-and-improvements]] +==== New Features and Improvements + +* ❓ + + +[[release-notes-5.11.2-junit-jupiter]] +=== JUnit Jupiter + +[[release-notes-5.11.2-junit-jupiter-bug-fixes]] +==== Bug Fixes + +* ❓ + +[[release-notes-5.11.2-junit-jupiter-deprecations-and-breaking-changes]] +==== Deprecations and Breaking Changes + +* ❓ + +[[release-notes-5.11.2-junit-jupiter-new-features-and-improvements]] +==== New Features and Improvements + +* ❓ + + +[[release-notes-5.11.2-junit-vintage]] +=== JUnit Vintage + +[[release-notes-5.11.2-junit-vintage-bug-fixes]] +==== Bug Fixes + +* ❓ + +[[release-notes-5.11.2-junit-vintage-deprecations-and-breaking-changes]] +==== Deprecations and Breaking Changes + +* ❓ + +[[release-notes-5.11.2-junit-vintage-new-features-and-improvements]] +==== New Features and Improvements + +* ❓ From ab941409706b7dabd578f1c87e48c484ba1b3182 Mon Sep 17 00:00:00 2001 From: Marc Philipp Date: Thu, 3 Oct 2024 10:58:07 +0200 Subject: [PATCH 04/10] Fix global read-write lock handling when not declared on top level Prior to this change additional locks were not cleared from siblings when discovering the global read-write lock on a test descriptor which led to incompatible locks and caused test execution to fail. Fixes #4027. (cherry picked from commit 871e8003088b3a6b627645af162a3fbec2370a77) --- .../release-notes/release-notes-5.11.2.adoc | 4 +- .../hierarchical/NodeExecutionAdvisor.java | 4 + .../support/hierarchical/NodeTreeWalker.java | 16 +- .../ParallelExecutionIntegrationTests.java | 190 +++++++++++++++--- 4 files changed, 181 insertions(+), 33 deletions(-) diff --git a/documentation/src/docs/asciidoc/release-notes/release-notes-5.11.2.adoc b/documentation/src/docs/asciidoc/release-notes/release-notes-5.11.2.adoc index 36d267b0e339..fcf7313a6354 100644 --- a/documentation/src/docs/asciidoc/release-notes/release-notes-5.11.2.adoc +++ b/documentation/src/docs/asciidoc/release-notes/release-notes-5.11.2.adoc @@ -16,7 +16,9 @@ on GitHub. [[release-notes-5.11.2-junit-platform-bug-fixes]] ==== Bug Fixes -* ❓ +* Fix regression in parallel execution that was introduced in 5.10.4/5.11.1 regarding + global read-write locks. When such a lock was declared on descendants of top-level nodes + in the test tree, such as Cucumber scenarios, test execution failed. [[release-notes-5.11.2-junit-platform-deprecations-and-breaking-changes]] ==== Deprecations and Breaking Changes diff --git a/junit-platform-engine/src/main/java/org/junit/platform/engine/support/hierarchical/NodeExecutionAdvisor.java b/junit-platform-engine/src/main/java/org/junit/platform/engine/support/hierarchical/NodeExecutionAdvisor.java index c3863a049342..eb95daab0237 100644 --- a/junit-platform-engine/src/main/java/org/junit/platform/engine/support/hierarchical/NodeExecutionAdvisor.java +++ b/junit-platform-engine/src/main/java/org/junit/platform/engine/support/hierarchical/NodeExecutionAdvisor.java @@ -33,6 +33,10 @@ void useResourceLock(TestDescriptor testDescriptor, ResourceLock resourceLock) { resourceLocksByTestDescriptor.put(testDescriptor, resourceLock); } + void removeResourceLock(TestDescriptor testDescriptor) { + resourceLocksByTestDescriptor.remove(testDescriptor); + } + Optional getForcedExecutionMode(TestDescriptor testDescriptor) { return testDescriptor.getParent().flatMap(this::lookupExecutionModeForcedByAncestor); } diff --git a/junit-platform-engine/src/main/java/org/junit/platform/engine/support/hierarchical/NodeTreeWalker.java b/junit-platform-engine/src/main/java/org/junit/platform/engine/support/hierarchical/NodeTreeWalker.java index 8e47d006849c..ada030923b76 100644 --- a/junit-platform-engine/src/main/java/org/junit/platform/engine/support/hierarchical/NodeTreeWalker.java +++ b/junit-platform-engine/src/main/java/org/junit/platform/engine/support/hierarchical/NodeTreeWalker.java @@ -50,6 +50,12 @@ NodeExecutionAdvisor walk(TestDescriptor rootDescriptor) { private void walk(TestDescriptor globalLockDescriptor, TestDescriptor testDescriptor, NodeExecutionAdvisor advisor) { + + if (advisor.getResourceLock(globalLockDescriptor) == globalReadWriteLock) { + // Global read-write lock is already being enforced, so no additional locks are needed + return; + } + Set exclusiveResources = getExclusiveResources(testDescriptor); if (exclusiveResources.isEmpty()) { if (globalLockDescriptor.equals(testDescriptor)) { @@ -73,7 +79,12 @@ private void walk(TestDescriptor globalLockDescriptor, TestDescriptor testDescri }); } if (allResources.contains(GLOBAL_READ_WRITE)) { - forceDescendantExecutionModeRecursively(advisor, globalLockDescriptor); + advisor.forceDescendantExecutionMode(globalLockDescriptor, SAME_THREAD); + doForChildrenRecursively(globalLockDescriptor, child -> { + advisor.forceDescendantExecutionMode(child, SAME_THREAD); + // Remove any locks that may have been set for siblings or their descendants + advisor.removeResourceLock(child); + }); advisor.useResourceLock(globalLockDescriptor, globalReadWriteLock); } else { @@ -94,8 +105,7 @@ private void forceDescendantExecutionModeRecursively(NodeExecutionAdvisor adviso } private boolean isReadOnly(Set exclusiveResources) { - return exclusiveResources.stream().allMatch( - exclusiveResource -> exclusiveResource.getLockMode() == ExclusiveResource.LockMode.READ); + return exclusiveResources.stream().allMatch(it -> it.getLockMode() == ExclusiveResource.LockMode.READ); } private Set getExclusiveResources(TestDescriptor testDescriptor) { diff --git a/platform-tests/src/test/java/org/junit/platform/engine/support/hierarchical/ParallelExecutionIntegrationTests.java b/platform-tests/src/test/java/org/junit/platform/engine/support/hierarchical/ParallelExecutionIntegrationTests.java index b556240bc295..4634c4c94f57 100644 --- a/platform-tests/src/test/java/org/junit/platform/engine/support/hierarchical/ParallelExecutionIntegrationTests.java +++ b/platform-tests/src/test/java/org/junit/platform/engine/support/hierarchical/ParallelExecutionIntegrationTests.java @@ -18,6 +18,7 @@ import static org.junit.jupiter.api.DynamicTest.dynamicTest; import static org.junit.jupiter.api.parallel.ExecutionMode.CONCURRENT; import static org.junit.jupiter.api.parallel.ExecutionMode.SAME_THREAD; +import static org.junit.jupiter.api.parallel.ResourceAccessMode.READ_WRITE; import static org.junit.jupiter.engine.Constants.DEFAULT_CLASSES_EXECUTION_MODE_PROPERTY_NAME; import static org.junit.jupiter.engine.Constants.DEFAULT_PARALLEL_EXECUTION_MODE; import static org.junit.jupiter.engine.Constants.PARALLEL_CONFIG_FIXED_MAX_POOL_SIZE_PROPERTY_NAME; @@ -25,6 +26,7 @@ import static org.junit.jupiter.engine.Constants.PARALLEL_CONFIG_STRATEGY_PROPERTY_NAME; import static org.junit.jupiter.engine.Constants.PARALLEL_EXECUTION_ENABLED_PROPERTY_NAME; import static org.junit.platform.commons.util.CollectionUtils.getOnlyElement; +import static org.junit.platform.engine.support.hierarchical.ExclusiveResource.GLOBAL_KEY; import static org.junit.platform.testkit.engine.EventConditions.container; import static org.junit.platform.testkit.engine.EventConditions.event; import static org.junit.platform.testkit.engine.EventConditions.finishedSuccessfully; @@ -65,6 +67,8 @@ import org.junit.jupiter.api.parallel.Execution; import org.junit.jupiter.api.parallel.Isolated; import org.junit.jupiter.api.parallel.ResourceLock; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.ValueSource; import org.junit.platform.engine.TestDescriptor; import org.junit.platform.engine.discovery.ClassSelector; import org.junit.platform.engine.discovery.DiscoverySelectors; @@ -73,6 +77,7 @@ import org.junit.platform.testkit.engine.EngineExecutionResults; import org.junit.platform.testkit.engine.EngineTestKit; import org.junit.platform.testkit.engine.Event; +import org.junit.platform.testkit.engine.Events; /** * @since 1.3 @@ -82,7 +87,7 @@ class ParallelExecutionIntegrationTests { @Test void successfulParallelTest(TestReporter reporter) { - var events = executeConcurrently(3, SuccessfulParallelTestCase.class); + var events = executeConcurrentlySuccessfully(3, SuccessfulParallelTestCase.class).list(); var startedTimestamps = getTimestampsFor(events, event(test(), started())); var finishedTimestamps = getTimestampsFor(events, event(test(), finishedSuccessfully())); @@ -98,13 +103,13 @@ void successfulParallelTest(TestReporter reporter) { @Test void failingTestWithoutLock() { - var events = executeConcurrently(3, FailingWithoutLockTestCase.class); + var events = executeConcurrently(3, FailingWithoutLockTestCase.class).list(); assertThat(events.stream().filter(event(test(), finishedWithFailure())::matches)).hasSize(2); } @Test void successfulTestWithMethodLock() { - var events = executeConcurrently(3, SuccessfulWithMethodLockTestCase.class); + var events = executeConcurrentlySuccessfully(3, SuccessfulWithMethodLockTestCase.class).list(); assertThat(events.stream().filter(event(test(), finishedSuccessfully())::matches)).hasSize(3); assertThat(ThreadReporter.getThreadNames(events)).hasSize(3); @@ -112,7 +117,7 @@ void successfulTestWithMethodLock() { @Test void successfulTestWithClassLock() { - var events = executeConcurrently(3, SuccessfulWithClassLockTestCase.class); + var events = executeConcurrentlySuccessfully(3, SuccessfulWithClassLockTestCase.class).list(); assertThat(events.stream().filter(event(test(), finishedSuccessfully())::matches)).hasSize(3); assertThat(ThreadReporter.getThreadNames(events)).hasSize(1); @@ -120,7 +125,7 @@ void successfulTestWithClassLock() { @Test void testCaseWithFactory() { - var events = executeConcurrently(3, TestCaseWithTestFactory.class); + var events = executeConcurrentlySuccessfully(3, TestCaseWithTestFactory.class).list(); assertThat(events.stream().filter(event(test(), finishedSuccessfully())::matches)).hasSize(3); assertThat(ThreadReporter.getThreadNames(events)).hasSize(1); @@ -133,7 +138,7 @@ void customContextClassLoader() { var smilingLoader = new URLClassLoader("(-:", new URL[0], ClassLoader.getSystemClassLoader()); currentThread.setContextClassLoader(smilingLoader); try { - var events = executeConcurrently(3, SuccessfulWithMethodLockTestCase.class); + var events = executeConcurrentlySuccessfully(3, SuccessfulWithMethodLockTestCase.class).list(); assertThat(events.stream().filter(event(test(), finishedSuccessfully())::matches)).hasSize(3); assertThat(ThreadReporter.getThreadNames(events)).hasSize(3); @@ -146,7 +151,8 @@ void customContextClassLoader() { @RepeatedTest(10) void mixingClassAndMethodLevelLocks() { - var events = executeConcurrently(4, TestCaseWithSortedLocks.class, TestCaseWithUnsortedLocks.class); + var events = executeConcurrentlySuccessfully(4, TestCaseWithSortedLocks.class, + TestCaseWithUnsortedLocks.class).list(); assertThat(events.stream().filter(event(test(), finishedSuccessfully())::matches)).hasSize(6); assertThat(ThreadReporter.getThreadNames(events).count()).isLessThanOrEqualTo(2); @@ -154,7 +160,7 @@ void mixingClassAndMethodLevelLocks() { @RepeatedTest(10) void locksOnNestedTests() { - var events = executeConcurrently(3, TestCaseWithNestedLocks.class); + var events = executeConcurrentlySuccessfully(3, TestCaseWithNestedLocks.class).list(); assertThat(events.stream().filter(event(test(), finishedSuccessfully())::matches)).hasSize(6); assertThat(ThreadReporter.getThreadNames(events)).hasSize(1); @@ -162,7 +168,7 @@ void locksOnNestedTests() { @Test void afterHooksAreCalledAfterConcurrentDynamicTestsAreFinished() { - var events = executeConcurrently(3, ConcurrentDynamicTestCase.class); + var events = executeConcurrentlySuccessfully(3, ConcurrentDynamicTestCase.class).list(); assertThat(events.stream().filter(event(test(), finishedSuccessfully())::matches)).hasSize(1); var timestampedEvents = ConcurrentDynamicTestCase.events; @@ -175,14 +181,14 @@ void afterHooksAreCalledAfterConcurrentDynamicTestsAreFinished() { */ @Test void threadInterruptedByUserCode() { - var events = executeConcurrently(3, InterruptedThreadTestCase.class); + var events = executeConcurrentlySuccessfully(3, InterruptedThreadTestCase.class).list(); assertThat(events.stream().filter(event(test(), finishedSuccessfully())::matches)).hasSize(4); } @Test void executesTestTemplatesWithResourceLocksInSameThread() { - var events = executeConcurrently(2, ConcurrentTemplateTestCase.class); + var events = executeConcurrentlySuccessfully(2, ConcurrentTemplateTestCase.class).list(); assertThat(events.stream().filter(event(test(), finishedSuccessfully())::matches)).hasSize(10); assertThat(ThreadReporter.getThreadNames(events)).hasSize(1); @@ -228,30 +234,22 @@ void executesMethodsInParallelIfEnabledViaConfigurationParameter() { @Test void canRunTestsIsolatedFromEachOther() { - var events = executeConcurrently(2, IsolatedTestCase.class); - - assertThat(events.stream().filter(event(test(), finishedWithFailure())::matches)).isEmpty(); + executeConcurrentlySuccessfully(2, IsolatedTestCase.class); } @Test void canRunTestsIsolatedFromEachOtherWithNestedCases() { - var events = executeConcurrently(4, NestedIsolatedTestCase.class); - - assertThat(events.stream().filter(event(test(), finishedWithFailure())::matches)).isEmpty(); + executeConcurrentlySuccessfully(4, NestedIsolatedTestCase.class); } @Test void canRunTestsIsolatedFromEachOtherAcrossClasses() { - var events = executeConcurrently(4, IndependentClasses.A.class, IndependentClasses.B.class); - - assertThat(events.stream().filter(event(test(), finishedWithFailure())::matches)).isEmpty(); + executeConcurrentlySuccessfully(4, IndependentClasses.A.class, IndependentClasses.B.class); } @RepeatedTest(10) void canRunTestsIsolatedFromEachOtherAcrossClassesWithOtherResourceLocks() { - var events = executeConcurrently(4, IndependentClasses.B.class, IndependentClasses.C.class); - - assertThat(events.stream().filter(event(test(), finishedWithFailure())::matches)).isEmpty(); + executeConcurrentlySuccessfully(4, IndependentClasses.B.class, IndependentClasses.C.class); } @Test @@ -262,9 +260,8 @@ void runsIsolatedTestsLastToMaximizeParallelism() { ); Class[] testClasses = { IsolatedTestCase.class, SuccessfulParallelTestCase.class }; var events = executeWithFixedParallelism(3, configParams, testClasses) // - .allEvents(); - - assertThat(events.stream().filter(event(test(), finishedWithFailure())::matches)).isEmpty(); + .allEvents() // + .assertStatistics(it -> it.failed(0)); List parallelTestMethodEvents = events.reportingEntryPublished() // .filter(e -> e.getTestDescriptor().getSource() // @@ -283,6 +280,15 @@ void runsIsolatedTestsLastToMaximizeParallelism() { assertThat(isolatedClassStart).isAfterOrEqualTo(parallelClassFinish); } + @ParameterizedTest + @ValueSource(classes = { IsolatedMethodFirstTestCase.class, IsolatedMethodLastTestCase.class, + IsolatedNestedMethodFirstTestCase.class, IsolatedNestedMethodLastTestCase.class }) + void canRunTestsIsolatedFromEachOtherWhenDeclaredOnMethodLevel(Class testClass) { + List events = executeConcurrentlySuccessfully(1, testClass).list(); + + assertThat(ThreadReporter.getThreadNames(events)).hasSize(1); + } + @Isolated("testing") static class IsolatedTestCase { static AtomicInteger sharedResource; @@ -355,6 +361,122 @@ void b() throws Exception { } } + @ExtendWith(ThreadReporter.class) + static class IsolatedMethodFirstTestCase { + + static AtomicInteger sharedResource; + static CountDownLatch countDownLatch; + + @BeforeAll + static void initialize() { + sharedResource = new AtomicInteger(); + countDownLatch = new CountDownLatch(2); + } + + @Test + @ResourceLock(value = GLOBAL_KEY, mode = READ_WRITE) // effectively @Isolated + void test1() throws InterruptedException { + incrementBlockAndCheck(sharedResource, countDownLatch); + } + + @Test + @ResourceLock(value = "b", mode = READ_WRITE) + void test2() throws InterruptedException { + incrementBlockAndCheck(sharedResource, countDownLatch); + } + } + + @ExtendWith(ThreadReporter.class) + static class IsolatedMethodLastTestCase { + + static AtomicInteger sharedResource; + static CountDownLatch countDownLatch; + + @BeforeAll + static void initialize() { + sharedResource = new AtomicInteger(); + countDownLatch = new CountDownLatch(2); + } + + @Test + @ResourceLock(value = "b", mode = READ_WRITE) + void test1() throws InterruptedException { + incrementBlockAndCheck(sharedResource, countDownLatch); + } + + @Test + @ResourceLock(value = GLOBAL_KEY, mode = READ_WRITE) // effectively @Isolated + void test2() throws InterruptedException { + incrementBlockAndCheck(sharedResource, countDownLatch); + } + } + + @ExtendWith(ThreadReporter.class) + static class IsolatedNestedMethodFirstTestCase { + + static AtomicInteger sharedResource; + static CountDownLatch countDownLatch; + + @BeforeAll + static void initialize() { + sharedResource = new AtomicInteger(); + countDownLatch = new CountDownLatch(2); + } + + @Nested + class Test1 { + + @Test + @ResourceLock(value = GLOBAL_KEY, mode = READ_WRITE) // effectively @Isolated + void test1() throws InterruptedException { + incrementBlockAndCheck(sharedResource, countDownLatch); + } + } + + @Nested + class Test2 { + + @Test + @ResourceLock(value = "b", mode = READ_WRITE) + void test2() throws InterruptedException { + incrementBlockAndCheck(sharedResource, countDownLatch); + } + } + } + + @ExtendWith(ThreadReporter.class) + static class IsolatedNestedMethodLastTestCase { + + static AtomicInteger sharedResource; + static CountDownLatch countDownLatch; + + @BeforeAll + static void initialize() { + sharedResource = new AtomicInteger(); + countDownLatch = new CountDownLatch(2); + } + + @Nested + class Test1 { + + @Test + @ResourceLock(value = "b", mode = READ_WRITE) + void test1() throws InterruptedException { + incrementBlockAndCheck(sharedResource, countDownLatch); + } + } + + @Nested + class Test2 { + + @Test + @ResourceLock(value = GLOBAL_KEY, mode = READ_WRITE) // effectively @Isolated + void test2() throws InterruptedException { + incrementBlockAndCheck(sharedResource, countDownLatch); + } + } + } + static class IndependentClasses { static AtomicInteger sharedResource = new AtomicInteger(); static CountDownLatch countDownLatch = new CountDownLatch(4); @@ -416,11 +538,21 @@ private List getTimestampsFor(List events, Condition cond // @formatter:on } - private List executeConcurrently(int parallelism, Class... testClasses) { + private Events executeConcurrentlySuccessfully(int parallelism, Class... testClasses) { + var events = executeConcurrently(parallelism, testClasses); + try { + return events.assertStatistics(it -> it.failed(0)); + } + catch (AssertionError error) { + events.debug(); + throw error; + } + } + + private Events executeConcurrently(int parallelism, Class... testClasses) { Map configParams = Map.of(DEFAULT_PARALLEL_EXECUTION_MODE, "concurrent"); return executeWithFixedParallelism(parallelism, configParams, testClasses) // - .allEvents() // - .list(); + .allEvents(); } private EngineExecutionResults executeWithFixedParallelism(int parallelism, Map configParams, From c11f224f821dd50fba28eee561372d76f63480cd Mon Sep 17 00:00:00 2001 From: Marc Philipp Date: Fri, 4 Oct 2024 13:48:05 +0200 Subject: [PATCH 05/10] Create initial 5.10.5 release notes from template --- .../docs/asciidoc/release-notes/index.adoc | 2 + .../release-notes/release-notes-5.10.5.adoc | 67 +++++++++++++++++++ 2 files changed, 69 insertions(+) create mode 100644 documentation/src/docs/asciidoc/release-notes/release-notes-5.10.5.adoc diff --git a/documentation/src/docs/asciidoc/release-notes/index.adoc b/documentation/src/docs/asciidoc/release-notes/index.adoc index f2d25bf5fbc1..8ed0f41bf6f1 100644 --- a/documentation/src/docs/asciidoc/release-notes/index.adoc +++ b/documentation/src/docs/asciidoc/release-notes/index.adoc @@ -23,6 +23,8 @@ include::{basedir}/release-notes-5.11.1.adoc[] include::{basedir}/release-notes-5.11.0.adoc[] +include::{basedir}/release-notes-5.10.5.adoc[] + include::{basedir}/release-notes-5.10.4.adoc[] include::{basedir}/release-notes-5.10.3.adoc[] diff --git a/documentation/src/docs/asciidoc/release-notes/release-notes-5.10.5.adoc b/documentation/src/docs/asciidoc/release-notes/release-notes-5.10.5.adoc new file mode 100644 index 000000000000..f7ec10435279 --- /dev/null +++ b/documentation/src/docs/asciidoc/release-notes/release-notes-5.10.5.adoc @@ -0,0 +1,67 @@ +[[release-notes-5.10.5]] +== 5.10.5 + +*Date of Release:* ❓ + +*Scope:* Bug fixes and enhancements since 5.10.4 + +For a complete list of all _closed_ issues and pull requests for this release, consult the +link:{junit5-repo}+/milestone/83?closed=1+[5.10.5] milestone page in the JUnit repository +on GitHub. + + +[[release-notes-5.10.5-junit-platform]] +=== JUnit Platform + +[[release-notes-5.10.5-junit-platform-bug-fixes]] +==== Bug Fixes + +* ❓ + +[[release-notes-5.10.5-junit-platform-deprecations-and-breaking-changes]] +==== Deprecations and Breaking Changes + +* ❓ + +[[release-notes-5.10.5-junit-platform-new-features-and-improvements]] +==== New Features and Improvements + +* ❓ + + +[[release-notes-5.10.5-junit-jupiter]] +=== JUnit Jupiter + +[[release-notes-5.10.5-junit-jupiter-bug-fixes]] +==== Bug Fixes + +* ❓ + +[[release-notes-5.10.5-junit-jupiter-deprecations-and-breaking-changes]] +==== Deprecations and Breaking Changes + +* ❓ + +[[release-notes-5.10.5-junit-jupiter-new-features-and-improvements]] +==== New Features and Improvements + +* ❓ + + +[[release-notes-5.10.5-junit-vintage]] +=== JUnit Vintage + +[[release-notes-5.10.5-junit-vintage-bug-fixes]] +==== Bug Fixes + +* ❓ + +[[release-notes-5.10.5-junit-vintage-deprecations-and-breaking-changes]] +==== Deprecations and Breaking Changes + +* ❓ + +[[release-notes-5.10.5-junit-vintage-new-features-and-improvements]] +==== New Features and Improvements + +* ❓ From 7e9d728f8bcb27a9b8d2b330995bb217374aedc6 Mon Sep 17 00:00:00 2001 From: Marc Philipp Date: Fri, 4 Oct 2024 13:50:35 +0200 Subject: [PATCH 06/10] Document #4043 in 5.10.5 release notes --- .../src/docs/asciidoc/release-notes/release-notes-5.10.5.adoc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/documentation/src/docs/asciidoc/release-notes/release-notes-5.10.5.adoc b/documentation/src/docs/asciidoc/release-notes/release-notes-5.10.5.adoc index f7ec10435279..b6823d8cf239 100644 --- a/documentation/src/docs/asciidoc/release-notes/release-notes-5.10.5.adoc +++ b/documentation/src/docs/asciidoc/release-notes/release-notes-5.10.5.adoc @@ -16,7 +16,9 @@ on GitHub. [[release-notes-5.10.5-junit-platform-bug-fixes]] ==== Bug Fixes -* ❓ +* Fix regression in parallel execution that was introduced in 5.10.4 regarding global + read-write locks. When such a lock was declared on descendants of top-level nodes in the + test tree, such as Cucumber scenarios, test execution failed. [[release-notes-5.10.5-junit-platform-deprecations-and-breaking-changes]] ==== Deprecations and Breaking Changes From 8e6393803f4df79023ccbeffbd756bc4cf0f9e62 Mon Sep 17 00:00:00 2001 From: Marc Philipp Date: Fri, 4 Oct 2024 13:51:22 +0200 Subject: [PATCH 07/10] Remove reference to 5.10.4 in 5.11.2 release notes --- .../docs/asciidoc/release-notes/release-notes-5.11.2.adoc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/documentation/src/docs/asciidoc/release-notes/release-notes-5.11.2.adoc b/documentation/src/docs/asciidoc/release-notes/release-notes-5.11.2.adoc index fcf7313a6354..673f283a6285 100644 --- a/documentation/src/docs/asciidoc/release-notes/release-notes-5.11.2.adoc +++ b/documentation/src/docs/asciidoc/release-notes/release-notes-5.11.2.adoc @@ -16,9 +16,9 @@ on GitHub. [[release-notes-5.11.2-junit-platform-bug-fixes]] ==== Bug Fixes -* Fix regression in parallel execution that was introduced in 5.10.4/5.11.1 regarding - global read-write locks. When such a lock was declared on descendants of top-level nodes - in the test tree, such as Cucumber scenarios, test execution failed. +* Fix regression in parallel execution that was introduced in 5.11.1 regarding global + read-write locks. When such a lock was declared on descendants of top-level nodes in the + test tree, such as Cucumber scenarios, test execution failed. [[release-notes-5.11.2-junit-platform-deprecations-and-breaking-changes]] ==== Deprecations and Breaking Changes From f8e22c7a32a12ec05bba81a4e509f5138fc6ea8a Mon Sep 17 00:00:00 2001 From: Marc Philipp Date: Fri, 4 Oct 2024 14:31:26 +0200 Subject: [PATCH 08/10] Finalize 5.10.5 release notes --- .../release-notes/release-notes-5.10.5.adoc | 42 ++----------------- 1 file changed, 3 insertions(+), 39 deletions(-) diff --git a/documentation/src/docs/asciidoc/release-notes/release-notes-5.10.5.adoc b/documentation/src/docs/asciidoc/release-notes/release-notes-5.10.5.adoc index b6823d8cf239..72c85d21cdeb 100644 --- a/documentation/src/docs/asciidoc/release-notes/release-notes-5.10.5.adoc +++ b/documentation/src/docs/asciidoc/release-notes/release-notes-5.10.5.adoc @@ -1,7 +1,7 @@ [[release-notes-5.10.5]] == 5.10.5 -*Date of Release:* ❓ +*Date of Release:* October 4, 2024 *Scope:* Bug fixes and enhancements since 5.10.4 @@ -20,50 +20,14 @@ on GitHub. read-write locks. When such a lock was declared on descendants of top-level nodes in the test tree, such as Cucumber scenarios, test execution failed. -[[release-notes-5.10.5-junit-platform-deprecations-and-breaking-changes]] -==== Deprecations and Breaking Changes - -* ❓ - -[[release-notes-5.10.5-junit-platform-new-features-and-improvements]] -==== New Features and Improvements - -* ❓ - [[release-notes-5.10.5-junit-jupiter]] === JUnit Jupiter -[[release-notes-5.10.5-junit-jupiter-bug-fixes]] -==== Bug Fixes - -* ❓ - -[[release-notes-5.10.5-junit-jupiter-deprecations-and-breaking-changes]] -==== Deprecations and Breaking Changes - -* ❓ - -[[release-notes-5.10.5-junit-jupiter-new-features-and-improvements]] -==== New Features and Improvements - -* ❓ +No changes. [[release-notes-5.10.5-junit-vintage]] === JUnit Vintage -[[release-notes-5.10.5-junit-vintage-bug-fixes]] -==== Bug Fixes - -* ❓ - -[[release-notes-5.10.5-junit-vintage-deprecations-and-breaking-changes]] -==== Deprecations and Breaking Changes - -* ❓ - -[[release-notes-5.10.5-junit-vintage-new-features-and-improvements]] -==== New Features and Improvements - -* ❓ +No changes. From b7816b6e6aa1341d9ad5cb38b8eca95ac7a0cbb6 Mon Sep 17 00:00:00 2001 From: Marc Philipp Date: Fri, 4 Oct 2024 14:53:37 +0200 Subject: [PATCH 09/10] Finalize 5.11.2 release notes --- .../release-notes/release-notes-5.11.2.adoc | 44 ++----------------- 1 file changed, 4 insertions(+), 40 deletions(-) diff --git a/documentation/src/docs/asciidoc/release-notes/release-notes-5.11.2.adoc b/documentation/src/docs/asciidoc/release-notes/release-notes-5.11.2.adoc index 673f283a6285..0bb4b292e1d9 100644 --- a/documentation/src/docs/asciidoc/release-notes/release-notes-5.11.2.adoc +++ b/documentation/src/docs/asciidoc/release-notes/release-notes-5.11.2.adoc @@ -1,9 +1,9 @@ [[release-notes-5.11.2]] == 5.11.2 -*Date of Release:* ❓ +*Date of Release:* October 4, 2024 -*Scope:* ❓ +*Scope:* Bug fixes and enhancements since 5.11.1 For a complete list of all _closed_ issues and pull requests for this release, consult the link:{junit5-repo}+/milestone/82?closed=1+[5.11.2] milestone page in the JUnit repository @@ -20,50 +20,14 @@ on GitHub. read-write locks. When such a lock was declared on descendants of top-level nodes in the test tree, such as Cucumber scenarios, test execution failed. -[[release-notes-5.11.2-junit-platform-deprecations-and-breaking-changes]] -==== Deprecations and Breaking Changes - -* ❓ - -[[release-notes-5.11.2-junit-platform-new-features-and-improvements]] -==== New Features and Improvements - -* ❓ - [[release-notes-5.11.2-junit-jupiter]] === JUnit Jupiter -[[release-notes-5.11.2-junit-jupiter-bug-fixes]] -==== Bug Fixes - -* ❓ - -[[release-notes-5.11.2-junit-jupiter-deprecations-and-breaking-changes]] -==== Deprecations and Breaking Changes - -* ❓ - -[[release-notes-5.11.2-junit-jupiter-new-features-and-improvements]] -==== New Features and Improvements - -* ❓ +No changes. [[release-notes-5.11.2-junit-vintage]] === JUnit Vintage -[[release-notes-5.11.2-junit-vintage-bug-fixes]] -==== Bug Fixes - -* ❓ - -[[release-notes-5.11.2-junit-vintage-deprecations-and-breaking-changes]] -==== Deprecations and Breaking Changes - -* ❓ - -[[release-notes-5.11.2-junit-vintage-new-features-and-improvements]] -==== New Features and Improvements - -* ❓ +No changes. From 5b1a6d1f2f32645449df3aae745684557aa2c524 Mon Sep 17 00:00:00 2001 From: Marc Philipp Date: Fri, 4 Oct 2024 14:55:15 +0200 Subject: [PATCH 10/10] Release 5.11.2 --- README.md | 2 +- gradle.properties | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 059bbb33077b..c01e40b25947 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ This repository is the home of _JUnit 5_. ## Latest Releases -- General Availability (GA): [JUnit 5.11.1](https://github.com/junit-team/junit5/releases/tag/r5.11.1) (September 25, 2024) +- General Availability (GA): [JUnit 5.11.2](https://github.com/junit-team/junit5/releases/tag/r5.11.2) (October 4, 2024) - Preview (Milestone/Release Candidate): N/A ## Documentation diff --git a/gradle.properties b/gradle.properties index 1f3ab837c07b..d91e522a244f 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,13 +1,13 @@ group = org.junit -version = 5.11.2-SNAPSHOT +version = 5.11.2 jupiterGroup = org.junit.jupiter platformGroup = org.junit.platform -platformVersion = 1.11.2-SNAPSHOT +platformVersion = 1.11.2 vintageGroup = org.junit.vintage -vintageVersion = 5.11.2-SNAPSHOT +vintageVersion = 5.11.2 # We need more metaspace due to apparent memory leak in Asciidoctor/JRuby # The exports are needed due to https://github.com/diffplug/spotless/issues/834 pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy