Do not assert thread count in ParallelApplicationEventsIntegrationTests
This commit is contained in:
@@ -68,13 +68,17 @@ class ParallelApplicationEventsIntegrationTests {
|
|||||||
Set<String> testNames = payloads.stream()//
|
Set<String> testNames = payloads.stream()//
|
||||||
.map(payload -> payload.substring(0, payload.indexOf("-")))//
|
.map(payload -> payload.substring(0, payload.indexOf("-")))//
|
||||||
.collect(Collectors.toSet());
|
.collect(Collectors.toSet());
|
||||||
Set<String> threadNames = payloads.stream()//
|
|
||||||
.map(payload -> payload.substring(payload.indexOf("-")))//
|
|
||||||
.collect(Collectors.toSet());
|
|
||||||
|
|
||||||
assertThat(payloads).hasSize(10);
|
assertThat(payloads).hasSize(10);
|
||||||
assertThat(testNames).hasSize(10);
|
assertThat(testNames).hasSize(10);
|
||||||
|
|
||||||
|
// The following assertion is currently commented out, since it fails
|
||||||
|
// regularly on the CI server due to only 1 thread being used for
|
||||||
|
// parallel test execution on the CI server.
|
||||||
|
/*
|
||||||
|
Set<String> threadNames = payloads.stream()//
|
||||||
|
.map(payload -> payload.substring(payload.indexOf("-")))//
|
||||||
|
.collect(Collectors.toSet());
|
||||||
int availableProcessors = Runtime.getRuntime().availableProcessors();
|
int availableProcessors = Runtime.getRuntime().availableProcessors();
|
||||||
// Skip the following assertion entirely if too few processors are available
|
// Skip the following assertion entirely if too few processors are available
|
||||||
// to the current JVM.
|
// to the current JVM.
|
||||||
@@ -86,6 +90,7 @@ class ParallelApplicationEventsIntegrationTests {
|
|||||||
.as("number of threads used with " + availableProcessors + " available processors")
|
.as("number of threads used with " + availableProcessors + " available processors")
|
||||||
.hasSizeGreaterThanOrEqualTo(2);
|
.hasSizeGreaterThanOrEqualTo(2);
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user