Configure default timeout of 15 minutes for all testable and lifecycle methods (#11505)

This helps to identify what tests cause builds to get stuck and it will more quickly end such builds.
When builds get stuck in tests, they would keep running for hours and then eventually when a timeout occurs, the job is killed without knowing why it got stuck.
Furhermore precious Jenkins executors will not keep being occupied by such jobs.

See: https://junit.org/junit5/docs/current/user-guide/#writing-tests-declarative-timeouts

It helps with identifying the root cause of issues like https://github.com/openhab/openhab-core/pull/2551

Signed-off-by: Wouter Born <github@maindrain.net>
This commit is contained in:
Wouter Born 2021-11-03 21:15:31 +01:00 committed by GitHub
parent 93fe919f49
commit e37fabac67
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -380,6 +380,11 @@ Import-Package: \\
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId> <artifactId>maven-surefire-plugin</artifactId>
<version>3.0.0-M5</version> <version>3.0.0-M5</version>
<configuration>
<systemPropertyVariables>
<junit.jupiter.execution.timeout.default>15 m</junit.jupiter.execution.timeout.default>
</systemPropertyVariables>
</configuration>
</plugin> </plugin>
<plugin> <plugin>