slawekjaranowski commented on code in PR #772: URL: https://github.com/apache/maven-surefire/pull/772#discussion_r1763824318
########## surefire-providers/surefire-junit-platform/src/main/java/org/apache/maven/surefire/junitplatform/JUnitPlatformProvider.java: ########## @@ -172,25 +171,13 @@ private void invokeAllTests(TestsToRun testsToRun, RunListenerAdapter adapter) { } private void execute(TestsToRun testsToRun, RunListenerAdapter adapter) { - if (testsToRun.allowEagerReading()) { - List<DiscoverySelector> selectors = new ArrayList<>(); - testsToRun.iterator().forEachRemaining(c -> selectors.add(selectClass(c.getName()))); - + testsToRun.iterator().forEachRemaining(c -> { LauncherDiscoveryRequestBuilder builder = request() .filters(filters) .configurationParameters(configurationParameters) - .selectors(selectors); - + .selectors(selectClass(c.getName())); launcher.execute(builder.build(), adapter); - } else { Review Comment: With this change I see in logs: ``` [INFO] Running pkg.domain.BxTest [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.014 s -- in pkg.domain.BxTest [INFO] pkg.domain.BxTest.test -- Time elapsed: 0.007 s [INFO] Running pkg.domain.AxTest [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.002 s -- in pkg.domain.AxTest [INFO] pkg.domain.AxTest.test -- Time elapsed: 0 s ``` but without: ``` [INFO] Running pkg.domain.AxTest [INFO] Running pkg.domain.BxTest [INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.015 s -- in pkg.domain.AxTest [INFO] pkg.domain.BxTest.test -- Time elapsed: 0.007 s [INFO] pkg.domain.AxTest.test -- Time elapsed: 0.007 s [INFO] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.015 s -- in pkg.domain.BxTest ``` so look like tests are executed sequentially not in parallel So for me problem is something else ... -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org