Skip to content

Commit 0be1956

Browse files
committed
MLE-25554 Excluding fragile tests on PR builds
Also removed the second mlWaitTillReady call based on updates to ml-gradle
1 parent a800b72 commit 0be1956

File tree

1 file changed

+14
-12
lines changed

1 file changed

+14
-12
lines changed

Jenkinsfile

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,31 @@
11
@Library('shared-libraries') _
22

3-
def runTests() {
4-
sh label: 'deploy-test-app-and-run-tests', script: '''
5-
export JAVA_HOME=$JAVA_HOME_DIR
6-
export GRADLE_USER_HOME=$WORKSPACE/$GRADLE_DIR
7-
export PATH=$JAVA_HOME/bin:${NODE_HOME_DIR}/bin:$PATH
3+
def runTests(excludeFragileTests = false) {
4+
def mochaGlob = excludeFragileTests ?
5+
'test-basic/!(documents-data-movement-*).js' :
6+
'test-basic/'
7+
8+
sh label: 'deploy-test-app-and-run-tests', script: """
9+
export JAVA_HOME=\$JAVA_HOME_DIR
10+
export GRADLE_USER_HOME=\$WORKSPACE/\$GRADLE_DIR
11+
export PATH=\$JAVA_HOME/bin:\${NODE_HOME_DIR}/bin:\$PATH
812
cd node-client-api
913
node --version
1014
npm --version
1115
npm ci
1216
1317
cd test-app
1418
./gradlew -i mlWaitTillReady
15-
sleep 3
16-
./gradlew -i mlWaitTillReady
1719
./gradlew -i mlTestConnections
1820
./gradlew -i mlDeploy
1921
./gradlew -i -Penv=e2e mlLoadData mlLoadModules
2022
2123
cd ..
22-
rm -rf $WORKSPACE/*.xml || true
23-
./node_modules/.bin/mocha --timeout 10000 -R xunit test-basic/ --reporter mocha-junit-reporter --reporter-options mochaFile=$WORKSPACE/test-basic-reports.xml || true
24+
rm -rf \$WORKSPACE/*.xml || true
25+
./node_modules/.bin/mocha --timeout 10000 -R xunit ${mochaGlob} --reporter mocha-junit-reporter --reporter-options mochaFile=\$WORKSPACE/test-basic-reports.xml || true
2426
./node_modules/.bin/gulp setupProxyTests || true
25-
./node_modules/.bin/mocha --timeout 10000 -R xunit test-basic-proxy/lib/**/*.js --reporter mocha-junit-reporter --reporter-options mochaFile=$WORKSPACE/test-basic-proxy-reports.xml || true
26-
'''
27+
./node_modules/.bin/mocha --timeout 10000 -R xunit test-basic-proxy/lib/**/*.js --reporter mocha-junit-reporter --reporter-options mochaFile=\$WORKSPACE/test-basic-proxy-reports.xml || true
28+
"""
2729
junit '**/*.xml'
2830
}
2931

@@ -152,7 +154,7 @@ pipeline {
152154
runLint()
153155
runTypeCheck()
154156
runDockerCompose('ml-docker-db-dev-tierpoint.bed-artifactory.bedford.progress.com/marklogic/marklogic-server-ubi:latest-12')
155-
runTests()
157+
runTests(true)
156158
runTypeScriptTests()
157159
runE2ETests()
158160
}

0 commit comments

Comments
 (0)