sddtc opened a new pull request, #7956:
URL: https://github.com/apache/incubator-seata/pull/7956

   <!--
       Licensed to the Apache Software Foundation (ASF) under one or more
       contributor license agreements.  See the NOTICE file distributed with
       this work for additional information regarding copyright ownership.
       The ASF licenses this file to You under the Apache License, Version 2.0
       (the "License"); you may not use this file except in compliance with
       the License.  You may obtain a copy of the License at
   
       http://www.apache.org/licenses/LICENSE-2.0
       
       Unless required by applicable law or agreed to in writing, software
       distributed under the License is distributed on an "AS IS" BASIS,
       WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
       See the License for the specific language governing permissions and
       limitations under the License.
   -->
   <!-- Please make sure you have read and understood the contributing 
guidelines -->
   
   - [x] I have read the 
[CONTRIBUTING.md](https://github.com/apache/incubator-seata/blob/2.x/CONTRIBUTING.md)
 guidelines.
   - [ ] I have registered the PR 
[changes](https://github.com/apache/incubator-seata/tree/2.x/changes).
   
   ### Ⅰ. Describe what this PR did
   my env:
   ```
   Maven home: /usr/local/Cellar/maven/3.9.12/libexec
   Java version: 25.0.1, vendor: Homebrew, runtime: 
/usr/local/Cellar/openjdk/25.0.1/libexec/openjdk.jdk/Contents/Home
   Default locale: en_CN, platform encoding: UTF-8
   OS name: "mac os x", version: "26.2", arch: "x86_64", family: "mac"
   ```
   
   Currently, when run 
   ```shell
   # generate jacoco report for common module with its dependencies module
   mvn clean test -pl common -am -X
   ```
   the value of `argLine`:
   
   <img width="1200" height="400" alt="image" 
src="https://github.com/user-attachments/assets/115b7fd0-2606-4746-b5cf-d9ebe0429cee";
 />
   
   then the resolved argLine in the forking command line:
   
   <img width="1200" height="486" alt="image" 
src="https://github.com/user-attachments/assets/c3dfb44a-3e95-49ed-8773-1e00223a6885";
 />
   
   ⚠️ missing the **default argLine** of `maven-surefire-plugin`, so the report 
won't be generated `jacoco` folder under `target/site` folder:
   
   <img width="300" height="500" alt="image" 
src="https://github.com/user-attachments/assets/9140e190-9438-4569-bc21-fc5d561302b4";
 />
   
   After adding `@{argLine}` and run `mvn clean test -pl common -am -X` again, 
the `@{argLine}` will be passed as a placeholder:
   
   <img width="3568" height="864" alt="image" 
src="https://github.com/user-attachments/assets/dad7ac92-5353-4d07-ac90-6edfe343463e";
 />
   
   then the `@{argLine}` will be resolved in the forking command line:
   
   <img width="1200" height="548" alt="image" 
src="https://github.com/user-attachments/assets/4f965c98-37b0-416b-8f61-3dc856cebc45";
 />
   
   🍏 the default args `-javaagent xxx`(the green box above) will be added when 
the command ran. and customised args will be **append** after `-javaagent xxx`. 
the jacoco report will be generated as well:
   
   <img width="300" height="500" alt="image" 
src="https://github.com/user-attachments/assets/d394bbe4-ec16-4006-9dbd-fe5195af5399";
 />
   
   
   ### Ⅱ. Does this pull request fix one issue?
   <!-- If that, add "fixes #xxx" below in the next line, for example, fixes 
#97. -->
   Nope.
   
   ### Ⅲ. Why don't you add test cases (unit test/integration test)? 
   no additional code wrote; It focus on fixing empty jacoco report for any 
modules when JDK version above 17; 
   
   ### Ⅳ. Describe how to verify it
   run 
   ```shell
   # generate jacoco report for common module with its dependencies module
   # fast, only run common module test cases
   mvn clean test -pl common -am -X
   # slow command, it will run all the test cases
   mvn clean test
   ```
   and the jacoco report will be generated successfully under 
`common/target/site` folder and the coverage is correct.
   
   ### Ⅴ. Special notes for reviews
   the `maven-surefire-plugin` version in the repo: 
   `<maven-surefire-plugin.version>3.0.0-M5</maven-surefire-plugin.version>`
   
   
https://maven.apache.org/surefire/maven-surefire-plugin/test-mojo.html#argLine
   > Since the Version 2.17 using an alternate syntax for argLine, @{...} 
allows late replacement of properties when the plugin is executed, so 
properties that have been modified by other plugins will be picked up 
correctly. 
   
   


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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to