]> git.basschouten.com Git - openhab-addons.git/commitdiff
Configure default timeout of 15 minutes for all testable and lifecycle methods (...
authorWouter Born <github@maindrain.net>
Wed, 3 Nov 2021 20:15:31 +0000 (21:15 +0100)
committerGitHub <noreply@github.com>
Wed, 3 Nov 2021 20:15:31 +0000 (21:15 +0100)
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>
pom.xml

diff --git a/pom.xml b/pom.xml
index 071cb03556b6f42dcd3b65bf297fc6e7ff955e41..ba3b31ff637cf8dc442e07670233ffdd0630c7f3 100644 (file)
--- a/pom.xml
+++ b/pom.xml
@@ -380,6 +380,11 @@ Import-Package: \\
           <groupId>org.apache.maven.plugins</groupId>
           <artifactId>maven-surefire-plugin</artifactId>
           <version>3.0.0-M5</version>
+          <configuration>
+            <systemPropertyVariables>
+              <junit.jupiter.execution.timeout.default>15 m</junit.jupiter.execution.timeout.default>
+            </systemPropertyVariables>
+          </configuration>
         </plugin>
 
         <plugin>