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 java.lang.Object implements org.junit.jupiter.api.extension.PreInterruptCallbackThe default implementation forPreInterruptCallback, which will print the stacks of allThreads toSystem.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
Fields Modifier and Type Field Description private static java.lang.StringNL
-
Constructor Summary
Constructors Constructor Description PreInterruptThreadDumpPrinter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private voidappendThreadName(java.lang.StringBuilder sb, java.lang.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 Detail
-
NL
private static final java.lang.String NL
- See Also:
- Constant Field Values
-
-
Method Detail
-
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
private void appendThreadName(java.lang.StringBuilder sb, java.lang.Thread th)Appends theThreadname and ID in a similar fashion asjstack.- Parameters:
sb- the bufferth- the thread to append
-
-