Copilot commented on code in PR #18214:
URL: 
https://github.com/apache/dolphinscheduler/pull/18214#discussion_r3188574821


##########
dolphinscheduler-master/pom.xml:
##########
@@ -372,6 +372,48 @@
                 </configuration>
             </plugin>
 
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-surefire-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>default-test</id>
+                        <configuration>
+                            <excludes>
+                                
<exclude>**/integration/cases/*TestCase.java</exclude>
+                            </excludes>
+                            <properties>
+                                
<configurationParameters>junit.jupiter.execution.parallel.enabled = 
false</configurationParameters>
+                            </properties>
+                        </configuration>
+                    </execution>
+                    <execution>
+                        <id>spring-boot-integration-test</id>
+                        <goals>
+                            <goal>test</goal>
+                        </goals>
+                        <phase>test</phase>
+                        <configuration>
+                            <includes>
+                                
<include>**/integration/cases/*TestCase.java</include>
+                            </includes>
+                            <forkCount>4</forkCount>
+                            <reuseForks>true</reuseForks>
+                            <properties>
+                                
<configurationParameters>junit.jupiter.execution.parallel.enabled = 
false</configurationParameters>
+                            </properties>
+                            <systemPropertyVariables>
+                                
<jacoco-agent.destfile>${project.build.directory}/jacoco.exec</jacoco-agent.destfile>
+                                
<spring.datasource.url>jdbc:h2:mem:dolphinscheduler-${surefire.forkNumber};MODE=MySQL;DB_CLOSE_DELAY=-1;DATABASE_TO_LOWER=true;</spring.datasource.url>
+                                
<master.listen-port>567${surefire.forkNumber}</master.listen-port>
+                                <server.port>0</server.port>
+                                
<master.worker-group-refresh-interval>1d</master.worker-group-refresh-interval>
+                            </systemPropertyVariables>

Review Comment:
   The integration-test surefire execution runs with forkCount=4 but still sets 
`jacoco-agent.destfile` to a single shared 
`${project.build.directory}/jacoco.exec`. With multiple forks, each JVM will 
write/overwrite the same JaCoCo exec file, which can corrupt/lose coverage 
data. Consider including `${surefire.forkNumber}` in the destfile and (if 
coverage is needed) merging the per-fork exec files in a later build step.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to