[SUREFIRE-1654] Remove deprecated forkMode parameter by SimonBaars · Pull Request #575 · apache/maven-surefire (original) (raw)
The forkMode parameter has been deprecated in Surefire 2.14, and with the upcoming 3.0 release, it's finally time to remove the parameter once and for all.
Reviewer instructions
Removing the forkMode ended up being a quite comprehensive change. Throughout the refactoring/restructuring process, I ran the tests and integration tests often, to ensure equivalent behavior. I re-purposed most forkMode tests to test the forkCount parameter, removing a few that were per definition redundant.
Each commit should address a "sub-issue" I had to tackle to remove the forkMode. If the entire diff looks daunting, I can recommend reviewing commit-by-commit. Each commit should be a version that compiles on its own.
Here are a few more pointers for reviewing:
- Read this article about migrating
forkModetoforkCount. - Start with the first commit, where I remove the most important traces of the
forkModeparameter, before moving on to the entire diff. - I removed the migration guide from the docs. Is that okay or would we like to keep it up for now?
- I left some convenience methods for the different fork modes in the SurefireLauncher, let me know if you'd like me to unfold that.
- I avoided the term "fork mode" as much as possible, but still left some traces where it made sense.
What's next?
While working on this, I noticed a few codebase styling issues that I'd like to refactor. To keep the diff of this PR sensible, I decided it would be better to open a separate PR for that. So you can expect another PR incoming 😉
Checklist
Following this checklist to help us incorporate your
contribution quickly and easily:
- Make sure there is a JIRA issue filed
for the change (usually before you start working on it). Trivial changes like typos do not
require a JIRA issue. Your pull request should address just this issue, without
pulling in other changes. - Each commit in the pull request should have a meaningful subject line and body.
- Format the pull request title like
[SUREFIRE-XXX] - Fixes bug in ApproximateQuantiles,
where you replaceSUREFIRE-XXXwith the appropriate JIRA issue. Best practice
is to use the JIRA issue title in the pull request title and in the first line of the
commit message. - Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
- Run
mvn clean installto make sure basic checks pass. A more thorough check will
be performed on your pull request automatically. - You have run the integration tests successfully (
mvn -Prun-its clean install).
If your pull request is about ~20 lines of code you don't need to sign an
Individual Contributor License Agreement if you are unsure
please ask on the developers list.
License
To make clear that you license your contribution under
the Apache License Version 2.0, January 2004
you have to acknowledge this by using the following check-box.
- I hereby declare this contribution to be licenced under the Apache License Version 2.0, January 2004
- In any other case, please file an Apache Individual Contributor License Agreement.