michael-o commented on code in PR #772:
URL: https://github.com/apache/maven-surefire/pull/772#discussion_r1734340010


##########
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:
   > Thinking about this a bit, I think I am misunderstanding what the eager 
reading actually means. Could you please clarify its intention? How does an end 
user set it and where?
   
   Unfortunately, I cannot answer these question because I have no idea.
   
   > In my case here, what is happening is, in a parallel run, the test runs 
are combined due to eager reading, the classes get executed together and hence 
tests get reported as a bundle (I'll look into the reporting aspect, maybe 
that's the issue and not the execution). But in general, I felt there is no 
need for eager reading for a parallel run. Maybe we need to separate the 2 
conditions?
   
   Is this similar: https://issues.apache.org/jira/browse/SUREFIRE-2195?



-- 
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

Reply via email to