Class JstackTimeoutExtension

java.lang.Object
org.apache.maven.plugin.surefire.extensions.timeout.JstackTimeoutExtension
All Implemented Interfaces:
ForkedProcessTimeoutExtension

public class JstackTimeoutExtension extends Object implements ForkedProcessTimeoutExtension
Built-in ForkedProcessTimeoutExtension that captures a jstack thread dump of the forked test JVM just before it is killed because of forkedProcessTimeoutInSeconds.

The output is written to <reportsDirectory>/surefire-timeout-jstack-<forkNumber>-<pid>.txt.

Activation: this extension is registered via META-INF/services but is disabled by default. To enable it set the system property surefire.timeout.jstack.enabled=true on the Maven process (for example with MAVEN_OPTS or -Dsurefire.timeout.jstack.enabled=true). The jstack binary is resolved from ${java.home}/bin/jstack, the parent JDK bin (Java 8 layout), $JAVA_HOME/bin/jstack, and finally from PATH.

Since:
3.6.0