-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Description
Describe the bug
After migration from Quarkus 3.5.3 to Quarkus 3.6.0, the jacoco report file in our projects is not generated correctly. This happens only for an application which has multiple tests with custom/different test profiles.
Snippets from xml file:
<counter type="COMPLEXITY" missed="0" covered="2"/>
<counter type="METHOD" missed="0" covered="2"/>
<counter type="CLASS" missed="0" covered="1"/>
</report>report>In this example, the last line of the file is incorrect. Full example: https://github.com/andrejpetras/quarkus-ex-mapper/blob/feat/jacoco/examples/jacoco-3.xml#L46
<counter type="LINE" missed="0" covered="1"/>
<co1"/>
<counter type="COMPLEXITY" missed="0" covered="1"/> <co1"/> Element?
</sourcefile>
<count="INSTRUCTION" missed="0" covered="8"/>
<counter type="LINE" missed="0" covered="2"/>count Element?
Expected behavior
The jacoco xml report file is generated correctly as a valid xml format.
Actual behavior
If the application does have multiple tests with different/custom test profiles (see example), the jacoco report xml file is not generated correctly.
Report examples: https://github.com/andrejpetras/quarkus-ex-mapper/tree/feat/jacoco/examples
How to Reproduce?
I created an example application: https://github.com/andrejpetras/quarkus-ex-mapper/tree/feat/jacoco
To reproduce this issue run following steps:
- build application
mvn clean package - validate and check
target/jacoco-report/jacoco.xmlfile.
Output of uname -a or ver
Linux CE52819 5.15.90.1-microsoft-standard-WSL2 #1 SMP Fri Jan 27 02:56:13 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Output of java -version
openjdk 21.0.1 2023-10-17 LTS OpenJDK Runtime Environment Zulu21.30+15-CA (build 21.0.1+12-LTS) OpenJDK 64-Bit Server VM Zulu21.30+15-CA (build 21.0.1+12-LTS, mixed mode, sharing)
Quarkus version or git rev
3.6.0
Build tool (ie. output of mvnw --version or gradlew --version)
Apache Maven 3.9.5 (57804ffe001d7215b5e7bcb531cf83df38f93546) Maven home: /home/andrej/tools/maven Java version: 21.0.1, vendor: Azul Systems, Inc., runtime: /home/andrej/tools/zulu21.30.15-ca-jdk21.0.1-linux_x64 Default locale: en, platform encoding: UTF-8 OS name: "linux", version: "5.15.90.1-microsoft-standard-wsl2", arch: "amd64", family: "unix"
Additional information
No response