You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We are experiencing disconnects of the browser almost 100% of the time with karma-coverage. It used to happen on occasion, but now it happens consistently. On a MacBookPro it rarely happens, but we do see the CPU hit hard and memory usage go up to large numbers (node process at 6GB and browser at 2.5-3 GB). On an 8GB AWS Linux EC2, the browser disconnects. In the past, before I disabled our code's console logging, it was not uncommon to core dump the chromium process during unit tests.
This is the error message we get:
00:53:47.061 Chrome Headless 112.0.5614.0 (Linux x86_64) ERROR
00:53:47.061 Disconnected reconnect failed before timeout of 2000ms (ping timeout)
00:53:47.061 Chrome Headless 112.0.5614.0 (Linux x86_64) ERROR
00:53:47.061 Disconnected reconnect failed before timeout of 2000ms (ping timeout)
00:53:47.061 Chrome Headless 112.0.5614.0 (Linux x86_64) ERROR
00:53:47.061 Disconnected reconnect failed before timeout of 2000ms (ping timeout)
Turning coverage off fixes the issue, but as a result we have no code coverage.
I've tried also disabling includeAllSources. I've also played around with trying to exclude files to cover in the angular JSON using codeCoverageExclude but no help
We have a large project, with ~550 spec files and 16,000 unit tests. Our source code, including the tests, is approximately 1 million lines of typescript code.
We are looking to potentially break up our code into Angular libraries in the future, but I'm looking for a more short-term work-around for this issue
Any assistance would be appreciated.
The text was updated successfully, but these errors were encountered:
I'm running into similar issues with our large project. At this point, the only option I think we have in my project is splitting code into Angular libraries, so we're doing that right now.
It's very unfortunate that this issue hasn't even had a reply from anyone in the karma-coverage community, but I guess it's to be expected when Karma itself is deprecated.
EDIT: Oh, forgot to mention that one "option" might be to disable source maps. This results in tests/coverage completing for us-- however, the coverage report is inaccurate and trends low. So, not a great option at all. But it could be useful in the short term if your actual code coverage is moderately higher than any thresholds you have set.
We are experiencing disconnects of the browser almost 100% of the time with
karma-coverage
. It used to happen on occasion, but now it happens consistently. On a MacBookPro it rarely happens, but we do see the CPU hit hard and memory usage go up to large numbers (node process at 6GB and browser at 2.5-3 GB). On an 8GB AWS Linux EC2, the browser disconnects. In the past, before I disabled our code's console logging, it was not uncommon to core dump the chromium process during unit tests.This is the error message we get:
Turning coverage off fixes the issue, but as a result we have no code coverage.
We are using
karma-coverage
version2.2.1
Angular environment:
Karma coverage settings:
Other karma settings:
I've tried also disabling
includeAllSources
. I've also played around with trying to exclude files to cover in the angular JSON usingcodeCoverageExclude
but no helpWe have a large project, with ~550 spec files and 16,000 unit tests. Our source code, including the tests, is approximately 1 million lines of typescript code.
We are looking to potentially break up our code into Angular libraries in the future, but I'm looking for a more short-term work-around for this issue
Any assistance would be appreciated.
The text was updated successfully, but these errors were encountered: