-
Notifications
You must be signed in to change notification settings - Fork 53
MLE-25617 More fragile test handling #1042
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -89,16 +89,18 @@ def runTypeScriptTests() { | |
| junit '**/*test-typescript-reports.xml' | ||
| } | ||
|
|
||
| def runE2ETests() { | ||
| sh label: 'run-e2e-tests', script: ''' | ||
| export PATH=${NODE_HOME_DIR}/bin:$PATH | ||
| def runE2ETests(excludeFragileTests) { | ||
| def excludeFlag = excludeFragileTests ? '--exclude "test-complete/nodejs-dmsdk*.js"' : '' | ||
|
|
||
| sh label: 'run-e2e-tests', script: """ | ||
| export PATH=\${NODE_HOME_DIR}/bin:\$PATH | ||
| cd node-client-api | ||
| node --version | ||
| npm --version | ||
| npm ci | ||
|
|
||
| echo "Running test-complete tests" | ||
| ./node_modules/.bin/mocha --no-parallel -R xunit --timeout 60000 test-complete/ --reporter mocha-junit-reporter --reporter-options mochaFile=$WORKSPACE/test-complete-results.xml || true | ||
| ./node_modules/.bin/mocha --no-parallel -R xunit --timeout 60000 test-complete/ ${excludeFlag} --reporter mocha-junit-reporter --reporter-options mochaFile=\$WORKSPACE/test-complete-results.xml || true | ||
|
||
| echo "Done with test-complete tests" | ||
|
|
||
| cd test-complete-proxy | ||
|
|
@@ -110,12 +112,12 @@ def runE2ETests() { | |
| cp -R ml-modules/ ../test-complete | ||
| cd ../test-complete | ||
| ../node_modules/.bin/mocha -R xunit --timeout 20000 nodejs-ds-setup-docs.js | ||
| ../node_modules/.bin/mocha -R xunit --timeout 20000 "nodejs-ds-required-params.js" --reporter mocha-junit-reporter --reporter-options mochaFile=$WORKSPACE/ds-required-params-results.xml || true | ||
| ../node_modules/.bin/mocha -R xunit --timeout 20000 "nodejs-ds-error-map.js" --reporter mocha-junit-reporter --reporter-options mochaFile=$WORKSPACE/ds-multipleWorker-results.xml || true | ||
| ../node_modules/.bin/mocha -R xunit --timeout 20000 "nodejs-ds-multipleWorker.js" --reporter mocha-junit-reporter --reporter-options mochaFile=$WORKSPACE/ds-multipleWorker-results.xml || true | ||
| ../node_modules/.bin/mocha -R xunit --timeout 20000 "nodejs-ds-transactions.js" --reporter mocha-junit-reporter --reporter-options mochaFile=$WORKSPACE/ds-transactions-results.js.xml || true | ||
| ../node_modules/.bin/mocha -R xunit --timeout 20000 "nodejs-ds-dynamic.js" --reporter mocha-junit-reporter --reporter-options mochaFile=$WORKSPACE/ds-dynamic-results.xml || true | ||
| ''' | ||
| ../node_modules/.bin/mocha -R xunit --timeout 20000 "nodejs-ds-required-params.js" --reporter mocha-junit-reporter --reporter-options mochaFile=\$WORKSPACE/ds-required-params-results.xml || true | ||
| ../node_modules/.bin/mocha -R xunit --timeout 20000 "nodejs-ds-error-map.js" --reporter mocha-junit-reporter --reporter-options mochaFile=\$WORKSPACE/ds-multipleWorker-results.xml || true | ||
| ../node_modules/.bin/mocha -R xunit --timeout 20000 "nodejs-ds-multipleWorker.js" --reporter mocha-junit-reporter --reporter-options mochaFile=\$WORKSPACE/ds-multipleWorker-results.xml || true | ||
| ../node_modules/.bin/mocha -R xunit --timeout 20000 "nodejs-ds-transactions.js" --reporter mocha-junit-reporter --reporter-options mochaFile=\$WORKSPACE/ds-transactions-results.js.xml || true | ||
| ../node_modules/.bin/mocha -R xunit --timeout 20000 "nodejs-ds-dynamic.js" --reporter mocha-junit-reporter --reporter-options mochaFile=\$WORKSPACE/ds-dynamic-results.xml || true | ||
| """ | ||
| junit '**/*.xml' | ||
| } | ||
|
|
||
|
|
@@ -154,7 +156,7 @@ pipeline { | |
| runDockerCompose('ml-docker-db-dev-tierpoint.bed-artifactory.bedford.progress.com/marklogic/marklogic-server-ubi:latest-12') | ||
| runTests(true) | ||
| runTypeScriptTests() | ||
| runE2ETests() | ||
| runE2ETests(true) | ||
| } | ||
| post { | ||
| always { | ||
|
|
@@ -178,7 +180,7 @@ pipeline { | |
| runDockerCompose('ml-docker-db-dev-tierpoint.bed-artifactory.bedford.progress.com/marklogic/marklogic-server-ubi:latest-11') | ||
| runTests(false) | ||
| runTypeScriptTests() | ||
| runE2ETests() | ||
| runE2ETests(false) | ||
| } | ||
| post { | ||
| always { | ||
|
|
@@ -199,7 +201,7 @@ pipeline { | |
| runDockerCompose('ml-docker-db-dev-tierpoint.bed-artifactory.bedford.progress.com/marklogic/marklogic-server-ubi:latest-12') | ||
| runTests(false) | ||
| runTypeScriptTests() | ||
| runE2ETests() | ||
| runE2ETests(false) | ||
| } | ||
| post { | ||
| always { | ||
|
|
@@ -220,7 +222,7 @@ pipeline { | |
| runDockerCompose('ml-docker-db-dev-tierpoint.bed-artifactory.bedford.progress.com/marklogic/marklogic-server-ubi:latest-10') | ||
| runTests(false) | ||
| runTypeScriptTests() | ||
| runE2ETests() | ||
| runE2ETests(false) | ||
| } | ||
| post { | ||
| always { | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
excludeFlagconstruction may cause command-line parsing issues because the exclude pattern contains unescaped quotes. Consider moving the quotes outside or ensuring proper escaping:def excludeFlag = excludeFragileTests ? '--exclude test-complete/nodejs-dmsdk*.js' : ''or using proper escaping for the shell context.