Skip to content
This repository has been archived by the owner on Jan 4, 2023. It is now read-only.

Commit

Permalink
[JENKINS-37323] Implement test cases with new syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
scherler committed Sep 5, 2016
1 parent b587c8b commit d1ebf33
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 15 deletions.
2 changes: 1 addition & 1 deletion src/test/js/log-karaoke/stages.js
Expand Up @@ -31,7 +31,7 @@ module.exports = {
blueRunDetailPage.waitForElementPresent('svg circle.success');
// FIXME should be taken from somewhere dynamically
// Stop karaoke and go back in graph and see the result
const nodeDetail = blueRunDetailPage.forNode('5');
const nodeDetail = blueRunDetailPage.forNode('6');
// validate that karaoke has stopped but overall process still runs
nodeDetail.waitForElementVisible('g.progress-spinner.running');
// Validate the result of the node
Expand Down
31 changes: 17 additions & 14 deletions src/test/resources/test_scripts/stages-with-wait.groovy
@@ -1,18 +1,21 @@
node {
stage 'Stage 1'
sh 'sleep 3; echo `date` Stage 1;'
sh 'sleep 3; echo `date` Stage 1;'
stage 'Stage 2'
parallel firstBranch: {
sh 'echo `date` Stage 2 - first;sleep 3; echo `date` Stage 2 - first;sleep 3; echo `date` Stage 2 - first;'
stage ('Stage 1'){
sh 'sleep 3; echo `date` Stage 1;'
sh 'sleep 3; echo `date` Stage 1;'
}
stage ('Stage 2'){
parallel firstBranch: {
sh 'echo `date` Stage 2 - first;sleep 3; echo `date` Stage 2 - first;sleep 3; echo `date` Stage 2 - first;'

}, secondBranch: {
sh 'echo `date` Stage 2 - second;sleep 3; echo `date` Stage 2 - second;sleep 3; echo `date` Stage 2 - second;'
},
failFast: true
stage 'fin'
sh 'echo `date` fin;sleep 3; echo `date` fin;'
sh 'echo yeah > foo.txt'
archiveArtifacts 'foo.txt'
}, secondBranch: {
sh 'echo `date` Stage 2 - second;sleep 3; echo `date` Stage 2 - second;sleep 3; echo `date` Stage 2 - second;'
},
failFast: true
}
stage ('fin'){
sh 'echo `date` fin;sleep 3; echo `date` fin;'
sh 'echo yeah > foo.txt'
archiveArtifacts 'foo.txt'
}
stage 'NoSteps'
}

0 comments on commit d1ebf33

Please sign in to comment.