Skip to content

Commit 1674224

Browse files
committed
[Build] Specify timeout for test execution after agent was accessed
The top-level timeout specified in the global options of a Jenkins job is effective from the time the job starts its execution (waiting for the 'main' agents is excluded here). On the contrary timeouts defined on stage level include the time waiting for the stage's agent to become available. In some cases (currently only for Mac) the same physical machine is used to execute multiple test-configurations. Consequently some configurations have to wait a significant amount of time for the executing agent to become available. Therefore now timeouts are defined: An inner one effective only for the actual test execution, sufficient to execute one configuration. And an outer, global one, effective almost from when the job is triggered and with a larger value to cover the execution of multiple configurations. The global one mainly exists in order to prevent pending tests to pile up in case the infrastructure is flawed. Follow-up on - #3416
1 parent a5315fe commit 1674224

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

JenkinsJobs/AutomatedTests/integrationTests.jenkinsfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ def TEST_AGENT = null
22

33
pipeline {
44
options {
5-
timeout(time: 600, unit: 'MINUTES')
5+
timeout(time: 16, unit: 'HOURS') // global timeout (starts at the beginning of this job)
66
timestamps()
77
buildDiscarder(logRotator(numToKeepStr:'15', artifactNumToKeepStr:'5'))
88
skipDefaultCheckout()
@@ -48,7 +48,7 @@ pipeline {
4848
ANT_HOME = tool(type:'ant', name:'apache-ant-latest')
4949
ANT_OPTS = "-Djava.io.tmpdir=${pathOf(env.WORKSPACE + '/tmp')}"
5050
}
51-
steps {
51+
steps { timeout(time: 8, unit: 'HOURS') { // timeout of test execution (starts after the agent was accessed)
5252
// workspace is not always cleaned (a previous clean-up may have failed). Clean before git cloning or custom tools are installed into workspace.
5353
cleanWs()
5454
checkout scmGit(userRemoteConfigs: [[url: "${scm.userRemoteConfigs[0].url}"]], branches: [[name: "${scm.branches[0].name}"]],
@@ -92,7 +92,7 @@ pipeline {
9292
""")
9393
}
9494
junit keepLongStdio: true, testResults: '**/eclipse-testing/results/xml/*.xml'
95-
}
95+
}}
9696
post {
9797
always {
9898
script {

0 commit comments

Comments
 (0)