junit5
junit5 copied to clipboard
PreInterruptCallback extension
Overview
Added PreInterruptCallback extension to allow to hook into the @Timeout
extension before the executing Thread is interrupted.
The default implementation of PreInterruptCallback will simply print the stacks of all Thread to System.out. It is disabled by default and must be enabled with: junit.jupiter.execution.timeout.threaddump.enabled = true
Issue: #2938
I hereby agree to the terms of the JUnit Contributor License Agreement.
Definition of Done
- [x] There are no TODOs left in the code
- [x] Method preconditions are checked and documented in the method's Javadoc
- [x] Coding conventions (e.g. for logging) have been followed
- [x] Change is covered by automated tests including corner cases, errors, and exception handling
- [x] Public API has Javadoc and
@API
annotations - [x] Change is documented in the User Guide and Release Notes
I am currently not happy with the change in MutableExtensionRegistry
. Is there another way to get the current active ExtensionRegistry
from a current ExtensionContext
?