junit5 icon indicating copy to clipboard operation
junit5 copied to clipboard

PreInterruptCallback extension

Open AndreasTu opened this issue 1 year ago • 2 comments

Overview

Added PreInterruptCallback extension to allow to hook into the @Timeout extension before the executing Thread is interrupted.

The default implementation of PreInterruptCallback will simply print the stacks of all Thread to System.out. It is disabled by default and must be enabled with: junit.jupiter.execution.timeout.threaddump.enabled = true

Issue: #2938


I hereby agree to the terms of the JUnit Contributor License Agreement.


Definition of Done

AndreasTu avatar Aug 19 '23 16:08 AndreasTu

I am currently not happy with the change in MutableExtensionRegistry. Is there another way to get the current active ExtensionRegistry from a current ExtensionContext?

AndreasTu avatar Aug 19 '23 16:08 AndreasTu