-
-
Notifications
You must be signed in to change notification settings - Fork 4
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
[BUG] XQSuite test passes locally but fails in CI #649
Comments
joewiz
added a commit
to joewiz/airlock
that referenced
this issue
Mar 24, 2021
problem reported at eXist-db/generator-exist#649
I think I'm CI-cursed. After commenting out the xqsuite test, CI is now showing a new failure (though no such error appears on my local system): npm run cypress
shell: /usr/bin/bash -e {0}
env:
JAVA_HOME_8.0.282_x64: /opt/hostedtoolcache/jdk/8.0.282/x64
JAVA_HOME: /opt/hostedtoolcache/jdk/8.0.282/x64
JAVA_HOME_8_0_282_X64: /opt/hostedtoolcache/jdk/8.0.282/x64
> airlock@2.0.2 cypress /home/runner/work/airlock/airlock
> cypress run
It looks like this is your first time using Cypress: 6.4.0
25l[20:58:53] Verifying Cypress can run /home/runner/.cache/Cypress/6.4.0/Cypress [started]
[20:58:55] Verifying Cypress can run /home/runner/.cache/Cypress/6.4.0/Cypress [completed]
25h
Opening Cypress...
====================================================================================================
tput: No value for $TERM and no -T specified
(Run Starting)
┌────────────────────────────────────────────────────────────────────────────────────────────────┐
│ Cypress: 6.4.0 │
│ Browser: Electron 87 (headless) │
│ Specs: 1 found (landing_spec.js) │
└────────────────────────────────────────────────────────────────────────────────────────────────┘
────────────────────────────────────────────────────────────────────────────────────────────────────
Running: landing_spec.js (1 of 1)
The landing page
1) should load
0 passing (246ms)
1 failing
1) The landing page
should load :
CypressError: `cy.visit()` failed trying to load:
http://localhost:8080/exist/apps/airlock/
The response we received from your web server was:
> 404: Not Found
This was considered a failure because the status code was not `2xx`.
If you do not want status codes to cause failures pass the option: `failOnStatusCode: false`
at http://localhost:8080/__cypress/runner/cypress_runner.js:158226:25
at visitFailedByErr (http://localhost:8080/__cypress/runner/cypress_runner.js:157602:12)
at http://localhost:8080/__cypress/runner/cypress_runner.js:158206:13
at tryCatcher (http://localhost:8080/__cypress/runner/cypress_runner.js:10609:23)
at Promise._settlePromiseFromHandler (http://localhost:8080/__cypress/runner/cypress_runner.js:8544:31)
at Promise._settlePromise (http://localhost:8080/__cypress/runner/cypress_runner.js:8601:18)
at Promise._settlePromise0 (http://localhost:8080/__cypress/runner/cypress_runner.js:8646:10)
at Promise._settlePromises (http://localhost:8080/__cypress/runner/cypress_runner.js:8722:18)
at _drainQueueStep (http://localhost:8080/__cypress/runner/cypress_runner.js:5316:12)
at _drainQueue (http://localhost:8080/__cypress/runner/cypress_runner.js:5309:9)
at Async.../../node_modules/bluebird/js/release/async.js.Async._drainQueues (http://localhost:8080/__cypress/runner/cypress_runner.js:5325:5)
at Async.drainQueues (http://localhost:8080/__cypress/runner/cypress_runner.js:5195:14)
From Your Spec Code:
at Context.eval (http://localhost:8080/__cypress/tests?p=test/cypress/integration/landing_spec.js:102:8)
(Results)
┌────────────────────────────────────────────────────────────────────────────────────────────────┐
│ Tests: 1 │
│ Passing: 0 │
│ Failing: 1 │
│ Pending: 0 │
│ Skipped: 0 │
│ Screenshots: 1 │
│ Video: true │
│ Duration: 0 seconds │
│ Spec Ran: landing_spec.js │
└────────────────────────────────────────────────────────────────────────────────────────────────┘
(Screenshots)
- /home/runner/work/airlock/airlock/reports/screenshots/landing_spec.js/The landin (1280x720)
g page -- should load (failed).png
(Video)
- Started processing: Compressing to 32 CRF
- Finished processing: /home/runner/work/airlock/airlock/reports/videos/landing_sp (0 seconds)
ec.js.mp4
tput: No value for $TERM and no -T specified
====================================================================================================
(Run Finished)
Spec Tests Passing Failing Pending Skipped
┌────────────────────────────────────────────────────────────────────────────────────────────────┐
│ ✖ landing_spec.js 234ms 1 - 1 - - │
└────────────────────────────────────────────────────────────────────────────────────────────────┘
✖ 1 of 1 failed (100%) 234ms 1 - 1 - -
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! airlock@2.0.2 cypress: `cypress run`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the airlock@2.0.2 cypress script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/runner/.npm/_logs/2021-03-24T20_59_07_630Z-debug.log
25h
Error: Process completed with exit code 1. For cypress to get a 404 for In contrast, here's the passing test on my local machine: joe@choskimac-iii airlock % npm run cypress
> airlock@2.0.2 cypress
> cypress run
====================================================================================================
(Run Starting)
┌────────────────────────────────────────────────────────────────────────────────────────────────┐
│ Cypress: 6.4.0 │
│ Browser: Electron 87 (headless) │
│ Specs: 1 found (landing_spec.js) │
└────────────────────────────────────────────────────────────────────────────────────────────────┘
────────────────────────────────────────────────────────────────────────────────────────────────────
Running: landing_spec.js (1 of 1)
The landing page
✓ should load (324ms)
1 passing (338ms)
(Results)
┌────────────────────────────────────────────────────────────────────────────────────────────────┐
│ Tests: 1 │
│ Passing: 1 │
│ Failing: 0 │
│ Pending: 0 │
│ Skipped: 0 │
│ Screenshots: 0 │
│ Video: true │
│ Duration: 0 seconds │
│ Spec Ran: landing_spec.js │
└────────────────────────────────────────────────────────────────────────────────────────────────┘
(Video)
- Started processing: Compressing to 32 CRF
- Finished processing: /Users/joe/workspace/hsg-project/repos/airlock/reports/vide (0 seconds)
os/landing_spec.js.mp4
====================================================================================================
(Run Finished)
Spec Tests Passing Failing Pending Skipped
┌────────────────────────────────────────────────────────────────────────────────────────────────┐
│ ✔ landing_spec.js 335ms 1 1 - - - │
└────────────────────────────────────────────────────────────────────────────────────────────────┘
✔ All specs passed! 335ms 1 1 - - - |
joewiz
added a commit
to joewiz/airlock
that referenced
this issue
Mar 24, 2021
joewiz
added a commit
to joewiz/airlock
that referenced
this issue
Mar 24, 2021
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
The XQSuite test passes locally for me but is failing in CI. The mocha test runner files were generated by generator-exist and otherwise completely unchanged. Original: xqSuite.js from generator-exist package. My app's version: xqSuite.js. Here’s the failure in CI. From the CI logs, it looks like the request to
/exist/rest/db/apps/airlock/test/xqs/test-runner.xq
is returning invalid JSON, whereas on my machine this request is returning valid JSON and passing as expected.Expected behavior
I'd expect a test that passes locally to also pass in CI.
To Reproduce
See the mocha test at https://github.com/joewiz/airlock/blob/master/test/xqs/xqSuite.js.
Running this locally, I get the following successful results:
See the logs showing the CI failure at https://github.com/joewiz/airlock/runs/2185512671?check_suite_focus=true:
Context (please always complete the following information):
Additional context
conf.xml
? noneThe text was updated successfully, but these errors were encountered: