-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Re-executes tests continuously in the same browser (race condition bug) #613
Comments
If you need more logs or debug info I can reproduce the bug in my computer every time I run the tests. |
Can you send the debug output again, but using |
The DEBUG-some tests-DEBUG-again-two-tests-more cycle it's repeated 10 times before it stops the first execution. I've copied only the first 4 because they're similar. I have only the browser & the console opened this time, so no Sublime interference it's possible.
|
I think some of your tests reloads the full page. There's an open issue for fixing this #27 |
I will investigate further trying to see what test is the cause of this reload |
It was a |
I'm using Karma version: 0.9.4 (but the stable one has the same problem too).
Command: karma start config/karma.conf.js --log-level debug
Some kind of strange race condition occurs randomly that makes karma run tests, disconnects half the way; reconnect; run two or three set of tests in the same browser instance (as if they would be different browsers) and then disconnect some of them.
After the ignored files debug messages this is the debug log. It's important to note I didn't touched any file so only one run should have been made here:
DEBUG [karma]: New browser has connected on socket Nr6eEqsamhsgN5TSisUU
INFO [Chrome 29.0.1547 (Linux)]: Connected on socket id Nr6eEqsamhsgN5TSisUU
DEBUG [karma]: All browsers are ready, executing
DEBUG [web server]: serving: /usr/local/lib/node_modules/karma/static/context.html
Chrome 29.0.1547 (Linux): Executed 113 of 113 SUCCESS (0.707 secs / 0.458 secs)
DEBUG [watcher]: Excluding /home/ernesto/projects/mailing/client/app/components/bower-angular/angular-scenario.js
DEBUG [watcher]: Excluding /home/ernesto/projects/mailing/client/config/karma.conf.js
DEBUG [karma]: All browsers are ready, executing
DEBUG [web server]: serving: /usr/local/lib/node_modules/karma/static/context.html
DEBUG [web server]: serving: /home/ernesto/projects/mailing/client/test/unit/controllers/logsSpec.js
Chrome 29.0.1547 (Linux): Executed 113 of 113 SUCCESS (0.903 secs / 0.414 secs)
DEBUG [web server]: serving: /usr/local/lib/node_modules/karma/static/client.html
WARN [Chrome 29.0.1547 (Linux)]: Disconnected
DEBUG [web server]: serving: /usr/local/lib/node_modules/karma/static/karma.js
DEBUG [karma]: New browser has connected on socket GKJG1ZTjOib1a84gisUV
INFO [Chrome 29.0.1547 (Linux)]: Connected on socket id GKJG1ZTjOib1a84gisUV
DEBUG [karma]: All browsers are ready, executing
DEBUG [web server]: serving: /usr/local/lib/node_modules/karma/static/context.html
Chrome 29.0.1547 (Linux): Executed 98 of 113
Chrome 29.0.1547 (Linux): Executed 113 of 113 SUCCESS (0.792 secs / 0.548 secs)
DEBUG [web server]: serving: /usr/local/lib/node_modules/karma/static/karma.js
DEBUG [karma]: New browser has connected on socket FV2Cz6kY4eEWhDsRisUW
INFO [Chrome 29.0.1547 (Linux)]: Connected on socket id FV2Cz6kY4eEWhDsRisUW
DEBUG [karma]: All browsers are ready, executing
DEBUG [web server]: serving: /usr/local/lib/node_modules/karma/static/context.html
Chrome 29.0.1547 (Linux): Executed 0 of 0
Chrome 29.0.1547 (Linux): Executed 113 of 113 SUCCESS (0.563 secs / 0.412 secs)
Chrome 29.0.1547 (Linux): Executed 0 of 0 DISCONNECTED (0.035 secs / 0 secs)
I think it's related to the error that makes PhantomJS run tests & restart without stop:
DEBUG [karma]: New browser has connected on socket Jtz6rwd54LMYfp_zkVnb
INFO [PhantomJS 1.8.2 (Linux)]: Connected on socket id Jtz6rwd54LMYfp_zkVnb
DEBUG [karma]: All browsers are ready, executing
DEBUG [web server]: serving: /usr/local/lib/node_modules/karma/static/context.html
DEBUG [web server]: serving: /usr/local/lib/node_modules/karma/static/context.html
PhantomJS 1.8.2 (Linux): Executed 0 of 0
PhantomJS 1.8.2 (Linux): Executed 93 of 113
PhantomJS 1.8.2 (Linux): Executed 113 of 113 SUCCESS (0.376 secs / 0.281 secs)
PhantomJS 1.8.2 (Linux): Executed 0 of 0 DISCONNECTED (0.005 secs / 0 secs)
DEBUG [web server]: serving: /usr/local/lib/node_modules/karma/static/karma.js
DEBUG [karma]: New browser has connected on socket NJJ-l1EDklmk4wqAkVnc
INFO [PhantomJS 1.8.2 (Linux)]: Connected on socket id NJJ-l1EDklmk4wqAkVnc
DEBUG [karma]: All browsers are ready, executing
DEBUG [web server]: serving: /usr/local/lib/node_modules/karma/static/context.html
DEBUG [web server]: serving: /usr/local/lib/node_modules/karma/static/context.html
PhantomJS 1.8.2 (Linux): Executed 0 of 0
PhantomJS 1.8.2 (Linux): Executed 95 of 113
PhantomJS 1.8.2 (Linux): Executed 113 of 113 SUCCESS (0.369 secs / 0.273 secs)
PhantomJS 1.8.2 (Linux): Executed 0 of 0 DISCONNECTED (0.007 secs / 0 secs)
DEBUG [web server]: serving: /usr/local/lib/node_modules/karma/static/karma.js
DEBUG [karma]: New browser has connected on socket -vj-wjYf5vnpX2RSkVnd
INFO [PhantomJS 1.8.2 (Linux)]: Connected on socket id -vj-wjYf5vnpX2RSkVnd
DEBUG [karma]: All browsers are ready, executing
DEBUG [web server]: serving: /usr/local/lib/node_modules/karma/static/context.html
DEBUG [web server]: serving: /usr/local/lib/node_modules/karma/static/context.html
PhantomJS 1.8.2 (Linux): Executed 0 of 0
PhantomJS 1.8.2 (Linux): Executed 95 of 113
PhantomJS 1.8.2 (Linux): Executed 0 of 0 DISCONNECTED (0.006 secs / 0 secs)
DEBUG [web server]: serving: /usr/local/lib/node_modules/karma/static/client.html
^CDEBUG [launcher]: Disconnecting all browsers
DEBUG [launcher]: Killing PhantomJS
The text was updated successfully, but these errors were encountered: