Skip to content

Commit ae5872d

Browse files
Resolved merge conflicts
1 parent d31d088 commit ae5872d

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

Jenkinsfile

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ pipeline {
4646
choice(name: 'nodeLabel', choices: ['ubuntu', 's390x', 'arm', 'Windows'])
4747
choice(name: 'jdkVersion', choices: ['jdk_17_latest', 'jdk_21_latest', 'jdk_24_latest', 'jdk_17_latest_windows', 'jdk_21_latest_windows', 'jdk_24_latest_windows'])
4848
booleanParam(name: 'deployEnabled', defaultValue: false)
49+
booleanParam(name: 'parallelTestsEnabled', defaultValue: true)
4950
booleanParam(name: 'sonarEnabled', defaultValue: false)
5051
booleanParam(name: 'testsEnabled', defaultValue: true)
5152
}
@@ -146,12 +147,20 @@ pipeline {
146147
}
147148
when { expression { return params.testsEnabled } }
148149
steps {
149-
echo 'Running tests'
150150
sh 'java -version'
151151
sh 'mvn -version'
152+
152153
// all tests is very very long (10 hours on Apache Jenkins)
153154
// sh 'mvn -B -e test -pl activemq-unit-tests -Dactivemq.tests=all'
154-
sh 'mvn -B -e -fae test -Dsurefire.rerunFailingTestsCount=3'
155+
script {
156+
if (params.parallelTestsEnabled == 'true') {
157+
sh 'echo "Running parallel-tests ..."'
158+
sh 'mvn -B -e -fae -Pparallel-tests test -Dsurefire.rerunFailingTestsCount=3'
159+
} else {
160+
sh 'echo "Running tests ..."'
161+
sh 'mvn -B -e -fae test -Dsurefire.rerunFailingTestsCount=3'
162+
}
163+
}
155164
}
156165
post {
157166
always {

0 commit comments

Comments
 (0)