-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
Only create ThreadGroups if FailOnTimeout.lookForStuckThread is true. #1691
Conversation
This reduces the differences (where possible) when tests are run with a timeout. Creating a ThreadGroup can cause noticeable differences, for example in code that uses java.beans.ThreadGroupContext.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea! 👍
src/main/java/org/junit/internal/runners/statements/FailOnTimeout.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice catch and thanks for explaining the details in the comments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! 👍
d5f0bf1
to
a501477
Compare
I updated this pull so that the release notes documents the change. @marcphilipp and/or @stefanbirkner would you please review the release notes? Thanks! |
This reduces the differences (where possible) when tests are run with a timeout.
Creating a ThreadGroup can cause noticeable differences, for example in code
that uses java.beans.ThreadGroupContext.