Top Description Fields Constructors Methods
org.junit.jupiter.engine.extension

pack-priv final Class PreInterruptThreadDumpPrinter

extends Object
implements PreInterruptCallback
Class Inheritance
All Implemented Interfaces
org.junit.jupiter.api.extension.PreInterruptCallback, org.junit.jupiter.api.extension.Extension
Imports
java.util.Map, org.junit.jupiter.api.extension.ExtensionContext, .PreInterruptCallback, .PreInterruptContext, org.junit.jupiter.engine.Constants

Default implementation of PreInterruptCallback, which prints the stacks of all Threads to System.out.

Note

This is disabled by default and must be enabled via Constants#EXTENSIONS_TIMEOUT_THREAD_DUMP_ENABLED_PROPERTY_NAME.

Since
5.12

Field Summary

Modifier and TypeField and Description
private static final String

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
private static void
appendThreadName(StringBuilder
the builder to append to
builder
,
Thread
the thread whose information should be appended
thread
)

Append the Thread name and ID in a similar fashion as jstack.

public void
beforeThreadInterrupt(PreInterruptContext preInterruptContext, ExtensionContext extensionContext)

Implements org.junit.jupiter.api.extension.PreInterruptCallback.beforeThreadInterrupt.

Callback that is invoked before a Thread is interrupted with Thread#interrupt().

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

NLback to summary
private static final String NL

Constructor Detail

PreInterruptThreadDumpPrinterback to summary
pack-priv PreInterruptThreadDumpPrinter()

Method Detail

appendThreadNameback to summary
private static void appendThreadName(StringBuilder builder, Thread thread)

Append the Thread name and ID in a similar fashion as jstack.

Parameters
builder:StringBuilder

the builder to append to

thread:Thread

the thread whose information should be appended

Annotations
@SuppressWarnings:deprecation
beforeThreadInterruptback to summary
public void beforeThreadInterrupt(PreInterruptContext preInterruptContext, ExtensionContext extensionContext)

Implements org.junit.jupiter.api.extension.PreInterruptCallback.beforeThreadInterrupt.

Doc from org.junit.jupiter.api.extension.PreInterruptCallback.beforeThreadInterrupt.

Callback that is invoked before a Thread is interrupted with Thread#interrupt().

Note

There is no guarantee on which Thread this callback will be executed.

Annotations
@Override