Interface PreInterruptCallback
- All Superinterfaces:
Extension
PreInterruptCallback defines the API for Extensions that wish to be called prior to invocations of
Thread.interrupt() by the Timeout
extension.
JUnit registers a default implementation that dumps the stacks of all
threads to System.out if the
"junit.jupiter.execution.timeout.threaddump.enabled" configuration parameter is set to
true.
- Since:
- 5.12
- See Also:
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoidbeforeThreadInterrupt(PreInterruptContext preInterruptContext, ExtensionContext extensionContext) Callback that is invoked before aThreadis interrupted withThread.interrupt().
-
Field Details
-
THREAD_DUMP_ENABLED_PROPERTY_NAME
-
-
Method Details
-
beforeThreadInterrupt
@API(status=MAINTAINED, since="5.13.3") void beforeThreadInterrupt(PreInterruptContext preInterruptContext, ExtensionContext extensionContext) throws Exception Callback that is invoked before aThreadis interrupted withThread.interrupt().Note: There is no guarantee on which
Threadthis callback will be executed.
-