[Pull request #1687:](junit-team/junit#1687) Mark ThreadGroups created by FailOnTimeout as daemon groups
In JUnit 4.13 ([pull request #1517](junit-team/junit4#1517)) an attempt was
made to fix leakage of the ThreadGroup instances created when a test is run with a timeout. That
change explicitly destroyed the ThreadGroup that was created for the time-limited test. Numerous
people reported problems that were caused by explicitly destroying the ThreadGroup.
In this change, the code was updated to call ThreadGroup.setDaemon(true) instead of destroying the
ThreadGroup.
Pull request $1691: Only create ThreadGroups if FailOnTimeout.lookForStuckThread is true.
In JUnit 4.12 ([pull request #742](junit-team/junit4#742)) the Timeout
Rule was updated to optionally display the stacktrace of the thread that appears to be stuck
(enabled on an opt-in basis by passing true to Timeout.Builder.lookForStuckThread(boolean)).
When that change was made, time-limited tests were changed to start the new thread in a new
ThreadGroup, even if the test did not call lookForStuckThread(). This subtle change in
behavior resulted in visible behavior changes to some tests (for example, tests of code that uses
java.beans.ThreadGroupContext).
In this change, the code is updated to only create a new ThreadGroup if the caller calls
Timeout.Builder.lookForStuckThread(true). Tests with timeouts that do not make this call will
behave as they did in JUnit 4.11 (and more similar to tests that do not have a timeout). This
unfortunately could result in visible changes of tests written or updated since the 4.12
release. If this change adversely affects your tests, you can create the Timeout rule via the
builder and call Timeout.Builder.lookForStuckThread(true).
This change fixes an issue where AssumptionViolatedException instances could not be serialized
if they were created with a constructor that takes in an org.hamcrest.Matcher instance (these
constructors are used if you use one of the assumeThat() methods in org.junit.Assume).
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Bumps junit:junit from 3.8.1 to 4.13.2.
Release notes
Sourced from junit:junit's releases.
Changelog
Sourced from junit:junit's changelog.
Commits
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase
.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show