Class PreInterruptThreadDumpPrinter
java.lang.Object
org.junit.jupiter.engine.extension.PreInterruptThreadDumpPrinter
- All Implemented Interfaces:
org.junit.jupiter.api.extension.Extension, org.junit.jupiter.api.extension.PreInterruptCallback
final class PreInterruptThreadDumpPrinter
extends Object
implements org.junit.jupiter.api.extension.PreInterruptCallback
The default implementation for
PreInterruptCallback,
which will print the stacks of all Threads to System.out.
Note: This is disabled by default, and must be enabled with
Constants.EXTENSIONS_TIMEOUT_THREAD_DUMP_ENABLED_PROPERTY_NAME
- Since:
- 5.12
-
Field Summary
FieldsFields inherited from interface org.junit.jupiter.api.extension.PreInterruptCallback
THREAD_DUMP_ENABLED_PROPERTY_NAME -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate voidappendThreadName(StringBuilder sb, Thread th) Appends theThreadname and ID in a similar fashion asjstack.voidbeforeThreadInterrupt(org.junit.jupiter.api.extension.PreInterruptContext preInterruptContext, org.junit.jupiter.api.extension.ExtensionContext extensionContext)
-
Field Details
-
NL
- See Also:
-
-
Constructor Details
-
PreInterruptThreadDumpPrinter
PreInterruptThreadDumpPrinter()
-
-
Method Details
-
beforeThreadInterrupt
public void beforeThreadInterrupt(org.junit.jupiter.api.extension.PreInterruptContext preInterruptContext, org.junit.jupiter.api.extension.ExtensionContext extensionContext) - Specified by:
beforeThreadInterruptin interfaceorg.junit.jupiter.api.extension.PreInterruptCallback
-
appendThreadName
Appends theThreadname and ID in a similar fashion asjstack.- Parameters:
sb- the bufferth- the thread to append
-