Skip to content

Commit a501477

Browse files
committed
Update release notes
1 parent e809a08 commit a501477

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

doc/ReleaseNotes4.13.2.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,20 @@ people reported problems that were caused by explicitly destroying the `ThreadGr
1111

1212
In this change, the code was updated to call `ThreadGroup.setDaemon(true)` instead of destroying the
1313
ThreadGroup.
14+
15+
### [Pull request $1691:](https://github.com/junit-team/junit/pull/1691) Only create ThreadGroups if FailOnTimeout.lookForStuckThread is true.
16+
17+
In JUnit 4.12 ([pull request #742](https://github.com/junit-team/junit4/pull/742)) the `Timeout`
18+
Rule was updated to optionally display the stacktrace of the thread that appears to be stuck
19+
(enabled on an opt-in basis by passing `true` to `Timeout.Builder.lookForStuckThread(boolean)`).
20+
When that change was made, time-limited tests were changed to start the new thread in a new
21+
`ThreadGroup`, even if the test did not call `lookForStuckThread()`. This subtle change in
22+
behavior resulted in visible behavior changes to some tests (for example, tests of code that uses
23+
`java.beans.ThreadGroupContext`).
24+
25+
In this change, the code is updated to only create a new `ThreadGroup` if the caller calls
26+
`Timeout.Builder.lookForStuckThread(true)`. Tests with timeouts that do not make this call will
27+
behave as they did in JUnit 4.11 (and more similar to tests that do not have a timeout). This
28+
unfortunately could result in visible changes of tests written or updated since the 4.12
29+
release. If this change adversely affects your tests, you can create the `Timeout` rule via the
30+
builder and call `Timeout.Builder.lookForStuckThread(true)`.

0 commit comments

Comments
 (0)