From 98dafd3746dcf141ac8b5906f26e69e9a140ff5d Mon Sep 17 00:00:00 2001 From: Marc Philipp Date: Mon, 23 Sep 2024 08:05:09 +0200 Subject: [PATCH] Reduce flakiness (cherry picked from commit eba01d8de45ff1b160ab03facf88ef204798f069) --- .../ForkJoinPoolHierarchicalTestExecutorServiceTests.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/platform-tests/src/test/java/org/junit/platform/engine/support/hierarchical/ForkJoinPoolHierarchicalTestExecutorServiceTests.java b/platform-tests/src/test/java/org/junit/platform/engine/support/hierarchical/ForkJoinPoolHierarchicalTestExecutorServiceTests.java index 2e0648df63bf..46c5bcc6cafe 100644 --- a/platform-tests/src/test/java/org/junit/platform/engine/support/hierarchical/ForkJoinPoolHierarchicalTestExecutorServiceTests.java +++ b/platform-tests/src/test/java/org/junit/platform/engine/support/hierarchical/ForkJoinPoolHierarchicalTestExecutorServiceTests.java @@ -228,7 +228,9 @@ void defersTasksWithIncompatibleLocksOnMultipleLevels() throws Throwable { }); assertThat(deferredTasks) // - .containsExactly(incompatibleTask1, incompatibleTask2, incompatibleTask1); // incompatibleTask1 may be deferred multiple times + .startsWith(incompatibleTask1, incompatibleTask2) // + .containsOnly(incompatibleTask1, incompatibleTask2) // incompatibleTask1 may be deferred multiple times + .containsOnlyOnce(incompatibleTask2); assertThat(taskFactory.tasks) // .hasSize(3 + 3 + 2) // .values().extracting(it -> it.completion.isDone()).containsOnly(true);