Comments (4)
Hello guys,
I opened pull request, so you can check the fix in #43.
What I found is that there are 3 issues:
- Karma 1.6.0 if you are using this version it has issues with browser reconnect functionality related to this article: http://karma-runner.github.io/4.0/about/changelog.html. The fix is available in version 3.1.4.
- When karma tries to "reconnect" the browser it triggers "browser_error" event first and then "browser_register" event again, which reflects in the shardIndexMap with same browser id but with wrong shard ID. For example lets say you have 3 browsers with ids: 0, 1, 2. And the browser with shard id 2 is disconnected, on reconnect his shard id will become 3, which is wrong. So the fix is to find available shard id.
- For some reason when the browser is reconnected his shard id is string (should be number) and the check inside the strategy functions is failing, so this is the reason why karma-parallel is adding one fake test in the disconnected browser instance.
For example: (count % executors) === shardID => (3 % 3) === '0' -> False (Add fake test instead). The fix is to cast them like: Number(a % b) === Number(c).
from karma-parallel.
+1
from karma-parallel.
@joeljeske Any thoughts on this one? This makes karma-parallel almost unusable for us because CI becomes unstable. At least feasible workaround would be highly appreciated.
from karma-parallel.
Hello guys,
I opened pull request, so you can check the fix in #43.
What I found is that there are 3 issues:
- Karma 1.6.0 if you are using this version it has issues with browser reconnect functionality related to this article: http://karma-runner.github.io/4.0/about/changelog.html. The fix is available in version 3.1.4.
- When karma tries to "reconnect" the browser it triggers "browser_error" event first and then "browser_register" event again, which reflects in the shardIndexMap with same browser id but with wrong shard ID. For example lets say you have 3 browsers with ids: 0, 1, 2. And the browser with shard id 2 is disconnected, on reconnect his shard id will become 3, which is wrong. So the fix is to find available shard id.
- For some reason when the browser is reconnected his shard id is string (should be number) and the check inside the strategy functions is failing, so this is the reason why karma-parallel is adding one fake test in the disconnected browser instance.
For example: (count % executors) === shardID => (3 % 3) === '0' -> False (Add fake test instead). The fix is to cast them like: Number(a % b) === Number(c).
from karma-parallel.
Related Issues (20)
- karma-parallel do not return exit code 1 anymore on too low code coverage HOT 7
- Exception when using "karma run" HOT 7
- Aggregated Log Output HOT 10
- No support for Circle CI HOT 2
- Support Karma 4 HOT 1
- When browser disconnects, remaining tests are skipped HOT 5
- Random failures with uncaught errors and missing tests
- Jasmine test timeout is ignored HOT 1
- Random test failures during CI process
- How to enable running tests in parallel on CI
- Publish new version HOT 2
- No calculation of all passed tests on kubernetis -job
- Script Error while executing karma tests HOT 1
- Only supporting Jasmine ?
- Karma parallel cannot find any tests after starting Chrome
- Need help to get code coverage HOT 3
- `Parallel` throws away global beforeEach in multi-browser mode
- Is there a way to let what files to run in what threads/browser instances ?
- failSpecWithNoExpectations to true in jasmine and karma-parallel add the extra tests HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from karma-parallel.