-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
🐛 Delayed force-exit gulp test
after Karma reports test completion
#14814
Conversation
/to @cvializ @jridgewell |
gulp test
after Karma reports test completion
Tested this locally, and I can verify that |
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.
rs lgtm
build-system/tasks/runtime-test.js
Outdated
@@ -371,7 +371,10 @@ function runTests() { | |||
log( | |||
red('ERROR:'), | |||
yellow('Karma test failed with exit code ' + exitCode)); | |||
process.exitCode = exitCode; | |||
// TODO(rsimha): Remove this after Karma / Sauce ticket is resolved. |
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.
Should probably link to issues here.
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.
Done.
Karma has some issues letting go after the test run. Ref karma-runner/karma#1788 and ampproject/amphtml#14814 This fix basically forces aegir to close after the karma tests have been successfully run, so instead of a test-run taking 13 seconds for the tests to run then 30 seconds for karma to force-close, it finishes in 14 seconds. Solves #212
There are several potential causes for the disconnect / timeout issues we're seeing on Travis, where Karma reports that all tests are complete, but
gulp test
doesn't terminate because something is holding it up from doing so.For example, see https://travis-ci.org/ampproject/amphtml/jobs/370168309
Related issues:
We have a ticket open with Sauce labs to investigate this.
Meanwhile, this PR temporarily mitigates the problem by force-exiting the
gulp test
process after a gap of 5 seconds, so that Karma reporters can print all their output to the console.Partial fix for #14800