-
Notifications
You must be signed in to change notification settings - Fork 5
Conversation
https://alfred.elifesciences.org/blue/organizations/jenkins/pull-requests-projects%2Felife-xpub/detail/PR-1251/4/pipeline is the first to reproduce the hanging problem. |
https://alfred.elifesciences.org/blue/organizations/jenkins/pull-requests-projects%2Felife-xpub/detail/PR-1251/5/pipeline has a similar output:
Multiple |
The actual hanging is happening after
so logs are needed after that line. |
More recent runs:
Yes, testcafe is calling |
https://alfred.elifesciences.org/blue/organizations/jenkins/pull-requests-projects%2Felife-xpub/detail/PR-1251/41/pipeline got stuck like this
which should be enough to think that even if there are other calls to |
https://alfred.elifesciences.org/blue/organizations/jenkins/pull-requests-projects%2Felife-xpub/detail/PR-1251/48/pipeline/39/ seems to get to the start of the test, will need to collect more data in case different runs differ on where they get stuck. |
https://alfred.elifesciences.org/blue/organizations/jenkins/pull-requests-projects%2Felife-xpub/detail/PR-1251/50/pipeline seems to agree, adding logs through the test. |
Note: at least until 4587185 we are able to reproduce the hanging behavior. |
Debug options do not tell us much more. Afraid we need to patch testcafe to understand what's going on in there as the control is not in our code. |
Theory: too long fixtures can cause the test suite to hang (>2 minutes or similar). |
After 30 second sleep addition:
|
Last 10 builds all hanging, this is now reproducible, I think. I also reproduced it locally by changing the sleep to
|
Jenkinsfile
Outdated
@@ -79,6 +70,14 @@ elifePipeline { | |||
} | |||
} | |||
|
|||
stage 'Browser Tests', { | |||
actions['test:browser'] = { |
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.
actions
is a dictionary of functions to be executed by parallel
, so if you want to execute the browser tests here you have to remove this assignment and just use the contents of the { withCommitStatus(...) }
0-argument function
actions['test:browser'] = { | ||
withCommitStatus({ | ||
sh "IMAGE_TAG=${commit} NODE_ENV=production NODE_CONFIG_ENV=test PGDATABASE=test_browser docker-compose -f docker-compose.yml -f docker-compose.ci.yml run -p 10081:10081 --rm --name elife-xpub_app_test_browser app bash -c 'socat -d tcp-listen:10081,reuseaddr,fork tcp:localhost:10080 & npm run test:browser -- --screenshots /tmp/screenshots --screenshots-on-fails'" | ||
}, 'test:browser', commit) |
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.
you also need the setup around it, since this command assumes a database started and ready:
try {
sh "IMAGE_TAG=${commit} docker-compose -f docker-compose.yml -f docker-compose.ci.yml up -d postgres"
sh "IMAGE_TAG=${commit} docker-compose -f docker-compose.yml -f docker-compose.ci.yml run --rm --name elife-xpub_wait_postgres app bash -c './scripts/wait-for-it.sh postgres:5432'"
// do things
} finally {
sh "IMAGE_TAG=${commit} docker-compose -f docker-compose.yml -f docker-compose.ci.yml down -v"
}
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.
also, the archiveArtifacts
in finally
is missing, which publishes the screenshots on the Jenkins UI
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.
Ah we removed that ... @damnhipster says they don't work anyway :)
Closing as fix has been implemented in #1273 |
No description provided.