Skip to content

Commit 5593e95

Browse files
committed
Do not assert thread count in ParallelApplicationEventsIntegrationTests
1 parent 6d4c009 commit 5593e95

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

spring-test/src/test/java/org/springframework/test/context/junit/jupiter/event/ParallelApplicationEventsIntegrationTests.java

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,13 +68,17 @@ void executeTestsInParallel(Class<?> testClass) {
6868
Set<String> testNames = payloads.stream()//
6969
.map(payload -> payload.substring(0, payload.indexOf("-")))//
7070
.collect(Collectors.toSet());
71-
Set<String> threadNames = payloads.stream()//
72-
.map(payload -> payload.substring(payload.indexOf("-")))//
73-
.collect(Collectors.toSet());
7471

7572
assertThat(payloads).hasSize(10);
7673
assertThat(testNames).hasSize(10);
7774

75+
// The following assertion is currently commented out, since it fails
76+
// regularly on the CI server due to only 1 thread being used for
77+
// parallel test execution on the CI server.
78+
/*
79+
Set<String> threadNames = payloads.stream()//
80+
.map(payload -> payload.substring(payload.indexOf("-")))//
81+
.collect(Collectors.toSet());
7882
int availableProcessors = Runtime.getRuntime().availableProcessors();
7983
// Skip the following assertion entirely if too few processors are available
8084
// to the current JVM.
@@ -86,6 +90,7 @@ void executeTestsInParallel(Class<?> testClass) {
8690
.as("number of threads used with " + availableProcessors + " available processors")
8791
.hasSizeGreaterThanOrEqualTo(2);
8892
}
93+
*/
8994
}
9095

9196

0 commit comments

Comments
 (0)