✔️ JUnit User Guide5.14.1

JUnit

    • Overview
    • Writing Tests
      • Annotations
      • Definitions
      • Test Classes and Methods
      • Display Names
      • Assertions
      • Assumptions
      • Exception Handling
      • Disabling Tests
      • Conditional Test Execution
      • Tagging and Filtering
      • Test Execution Order
      • Test Instance Lifecycle
      • Nested Tests
      • Dependency Injection for Constructors and Methods
      • Test Interfaces and Default Methods
      • Repeated Tests
      • Parameterized Classes and Tests
      • Class Templates
      • Test Templates
      • Dynamic Tests
      • Timeouts
      • Parallel Execution
      • Built-in Extensions
    • Migrating from JUnit 4
    • Running Tests
      • IDE Support
      • Build Support
      • Console Launcher
      • Using JUnit 4 to run the JUnit Platform
      • Discovery Selectors
      • Configuration Parameters
      • Tags
      • Capturing Standard Output/Error
      • Using Listeners and Interceptors
      • Stack Trace Pruning
      • Discovery Issues
    • Extension Model
      • Registering Extensions
      • Conditional Test Execution
      • Test Instance Pre-construct Callback
      • Test Instance Factories
      • Test Instance Post-processing
      • Test Instance Pre-destroy Callback
      • Parameter Resolution
      • Test Result Processing
      • Test Lifecycle Callbacks
      • Exception Handling
      • Pre-Interrupt Callback
      • Intercepting Invocations
      • Providing Invocation Contexts for Class Templates
      • Providing Invocation Contexts for Test Templates
      • Keeping State in Extensions
      • Supported Utilities in Extensions
      • Relative Execution Order of User Code and Extensions
    • Advanced Topics
      • JUnit Platform Reporting
      • JUnit Platform Suite Engine
      • JUnit Platform Test Kit
      • JUnit Platform Launcher API
      • Test Engines
    • API Evolution
    • Release Notes
    • Appendix
JUnit 5.14.1
  • JUnit
    • 6.1.0-SNAPSHOT
    • 6.0.2-SNAPSHOT
    • 6.0.1
    • 6.0.0
    • 5.14.2-SNAPSHOT
    • 5.14.1
  • JUnit
  • Extension Model
  • Pre-Interrupt Callback
6.1.0-SNAPSHOT 6.0.2-SNAPSHOT 6.0.1 6.0.0 5.14.2-SNAPSHOT 5.14.1
Edit this Page
There is a newer version available.
For the latest stable version, please use JUnit 6.0.1!

Pre-Interrupt Callback

PreInterruptCallback defines the API for Extensions that wish to react on timeouts before the Thread.interrupt() is called.

Please refer to Debugging Timeouts for additional information.

Exception Handling Intercepting Invocations
Deploys by Netlify

© Copyright 2015-2025 the original author or authors. All rights reserved. The content of this page is made available under the terms of the Eclipse Public License v2.0.

This page was built using an adapted version of the Antora default UI. The source code for this UI is licensed under the terms of the Mozilla Public License v2.0.