Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix JaCoCo execution when we have additional Surefire options #1079

Merged
merged 4 commits into from
Apr 5, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
<jacoco.haltOnFailure>false</jacoco.haltOnFailure>
<jjwt.suite.version>0.11.2</jjwt.suite.version>

<jacoco.surefire.argLine />
<surefire.argLine />
</properties>

Expand Down Expand Up @@ -107,6 +108,9 @@
<goals>
<goal>prepare-agent</goal>
</goals>
<configuration>
<propertyName>jacoco.surefire.argLine</propertyName>
</configuration>
</execution>
<!-- attached to Maven test phase -->
<execution>
Expand Down Expand Up @@ -274,7 +278,7 @@
<id>default-test</id>
<configuration>
<excludesFile>src/test/resources/slow-or-flaky-tests.txt</excludesFile>
<argLine>${surefire.argLine}</argLine>
<argLine>@{jacoco.surefire.argLine} ${surefire.argLine}</argLine>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To explain what happened: we are setting our own arg line now and, if set, the JaCoCo agent doesn't inject its options.

The change injects again the JaCoCo options.

</configuration>
</execution>
</executions>
Expand Down Expand Up @@ -582,7 +586,7 @@
<!-- There are some tests that take longer or are a little
flaky. Run them here. -->
<includesFile>src/test/resources/slow-or-flaky-tests.txt</includesFile>
<argLine>${surefire.argLine}</argLine>
<argLine>@{jacoco.surefire.argLine} ${surefire.argLine}</argLine>
</configuration>
</execution>
</executions>
Expand Down