sharanggupta opened a new pull request, #3543:
URL: https://github.com/apache/maven-surefire/pull/3543
With `forkCount=0` the tests run inside the Maven JVM, so the options in
`argLine` are never applied. This is easy to miss when another plugin sets
`argLine`. The usual case is the `-javaagent` from jacoco-maven-plugin: the
tests pass and the coverage is silently missing.
`verifyParameters()` already warns that `useSystemClassLoader` has no effect
when not forking. This adds the same warning for a non-blank `argLine`, as
suggested on the issue ("add sanity checks in `AbstractSurefireMojo`").
It warns rather than fails, as #2315 asks, because the debugging guide
recommends `mvn -DforkCount=0 test`, and failing would break that for every
project that inherits an `argLine`.
Two tests in `AbstractSurefireMojoTest` run `verifyParameters()` with
`forkCount` 0 and 1. The first one failed before this change. `mvn -pl
maven-surefire-common,maven-surefire-plugin,maven-failsafe-plugin -am verify`
passes.
Closes #2356
---
To make clear that you license your contribution under
the [Apache License Version 2.0, January
2004](https://www.apache.org/licenses/LICENSE-2.0)
check one of the following:
- [x] I hereby declare this contribution to be licensed under the [Apache
License Version 2.0, January 2004](https://www.apache.org/licenses/LICENSE-2.0)
- [ ] I hereby declare that I have filed an [Apache Individual Contributor
License Agreement](https://www.apache.org/licenses/icla.pdf).
--
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]