Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PreInterruptCallback extension #3431

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

AndreasTu
Copy link

@AndreasTu AndreasTu commented Aug 19, 2023

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.extensions.preinterruptcallback.default.enabled = true

Issue: #2938


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


Definition of Done

@AndreasTu
Copy link
Author

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

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.extensions.preinterruptcallback.default.enabled = true

Issue: junit-team#2938
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant