Skip to content

Support timeouts for extensions #2976

Open

Description

As #2037 was closed as stale and I did not want to ping a random person of the junit team there, I decided to create a new issue. Feel free to close this one and open the old one if you want to proceed the discussion there.

The feature request is to unify the definition of timeouts for extensions with the definition of timeouts in the test classes.

  • Using @Timeout for extension methods (Before/AfterEach/AllCallback)
  • Using global timeouts such as junit.jupiter.execution.timeout.beforeall.method.default applies to extension methods
    (maybe add a new property like junit.jupiter.execution.timeout.extension.beforeall.default which would make backwards compatibility easier.

While one can workaround with assertTimeoutPreemptively, it would be great if extensions follow the same timeout principles of being able to configure global default timeouts and overwriting them on specific methods if necessary.
From the above 2 points the second point is the more important one (the other one would still be great for consistency reasons).
Currently it is not possible to avoid stuck CI builds entirely by defining global timeout properties and all extensions need to carefully implement timeouts themselves (which is desired, but global timeouts for safety would be great).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions