-
Notifications
You must be signed in to change notification settings - Fork 105
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
Page timeout no longer works since grunt-contrib-qunit 3.0 #178
Comments
Krinkle
added a commit
to Krinkle/grunt-contrib-qunit
that referenced
this issue
Jun 28, 2021
Follows b35e7ce and gruntjs#147, which converted the plugin from PhantomJS to Headless Chromium. While `options.timeout` is still used for the navigation, it was no longer used to stop tasks that have crashed, broken or are timing out for other reasons at runtime. The approach of using an interval in the bridge is based on the original grunt-lib-phantomjs code [1]. I modified it to use a more graceful setTimeout recursion instead, and changed the "end" logic from a direct `exit()` call (which is not possible in chrome bridge), to simply not recursing further. The exit handling is already in place in tasks/qunit.js, where an `on("fail.*")` listener exists (though seemingly not utilised until now), which includes an indirect call to `browser.close()`. [1] https://github.com/gruntjs/grunt-lib-phantomjs/blob/v1.1.0/phantomjs/main.js#L43-L51 Fixes gruntjs#178.
Krinkle
added a commit
to Krinkle/qunit
that referenced
this issue
Jun 28, 2021
The next commit in this branch for issue _1511, will disallow adding tests if `QUnit.done()` and `runEnd` have already happened, thus leading these hacks to fail as follows: ```` Running "qunit:all" (qunit) task Testing http://localhost:4000/test/index.html […] Testing http://localhost:4000/test/module-skip.html .... Error: Unexpected new test after the run already ended at new Test (http://localhost:4000/qunit/qunit.js:2206:13) ^C ``` In addition, due to a known issue in grunt-contrib-qunit, these would also indefinitely hack instead of actually failing. Ref _gruntjs/grunt-contrib-qunit#178. Ref issue _1377. Ref issue _1511.
Krinkle
added a commit
to Krinkle/qunit
that referenced
this issue
Jun 28, 2021
The next commit in this branch for issue _1511, will disallow adding tests if `QUnit.done()` and `runEnd` have already happened, thus leading these hacks to fail as follows: ```` Running "qunit:all" (qunit) task Testing http://localhost:4000/test/index.html […] Testing http://localhost:4000/test/module-skip.html .... Error: Unexpected new test after the run already ended at new Test (http://localhost:4000/qunit/qunit.js:2206:13) ^C ``` In addition, due to a known issue in grunt-contrib-qunit, these would also indefinitely hack instead of actually failing. Ref _gruntjs/grunt-contrib-qunit#178. Ref issue _1377. Ref issue _1511.
Krinkle
added a commit
to Krinkle/qunit
that referenced
this issue
Jun 28, 2021
The next commit in this branch for qunitjs#1511, will disallow adding tests if `QUnit.done()` and `runEnd` have already happened, thus leading these hacks to fail as follows: ```` Running "qunit:all" (qunit) task Testing http://localhost:4000/test/index.html […] Testing http://localhost:4000/test/module-skip.html .... Error: Unexpected new test after the run already ended at new Test (http://localhost:4000/qunit/qunit.js:2206:13) ^C ``` In addition, due to a known issue in grunt-contrib-qunit, these would also indefinitely hack instead of actually failing. Ref gruntjs/grunt-contrib-qunit#178. Ref qunitjs#1377. Ref qunitjs#1511.
Krinkle
added a commit
to qunitjs/qunit
that referenced
this issue
Jul 3, 2021
The next commit in this branch for #1511, will disallow adding tests if `QUnit.done()` and `runEnd` have already happened, thus leading these hacks to fail as follows: ```` Running "qunit:all" (qunit) task Testing http://localhost:4000/test/index.html […] Testing http://localhost:4000/test/module-skip.html .... Error: Unexpected new test after the run already ended at new Test (http://localhost:4000/qunit/qunit.js:2206:13) ^C ``` In addition, due to a known issue in grunt-contrib-qunit, these would also indefinitely hack instead of actually failing. Ref gruntjs/grunt-contrib-qunit#178. Ref #1377. Ref #1511.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It seems in the conversion from phantomjs to headless Chromium, the
fail.timeout
event is no longer emitted, and there was no replacement for ensuring that page that is stuck with errors eventually leads to a failure.Instead, the task just hangs forever. This is further made worse now that projects on GitHub have largely switched from Travis to GitHub Actions, which usually does not show build output while a build is in progress. As such, one has to wait for 10 or 30 minutes for the overall build to timeout (or cancel the parent workflow), in order to find out which test was last reported as running.
The text was updated successfully, but these errors were encountered: