JUnit 5 -- global timeout?
Junit 5.5 does support "global timeout". Just have a look at documentation of corresponding property knobs.
For example, try to open file src/test/resources/junit-platform.properties
and paste there:
junit.jupiter.execution.timeout.default=42 ms
Prior to version 5.5 of JUnit, it was not possible to enforce a global, preemptive timeout for tests in JUnit Jupiter. This functionality was added as an experimental feature to JUnit 5.5.
To view the discussion around this feature, see the following issue: https://github.com/junit-team/junit5/issues/80