Skip to content
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

fix: karma hangs after finishing tests successfully #3852

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

berkon
Copy link

@berkon berkon commented Jun 26, 2023

After successfully finishing all tests, karma hangs for 30 sec with this message:

Chrome Headless 114.0.5735.35 (Windows 10) ERROR
Disconnected , because no message in 30000 ms.

This only happens when executing more than approx. 620 tests. It looks like after the state went to DISCONNECTED in these cases there are still some log messages sent. The problem is that in this case also the timeout is restarted and the whole process obviously only terminates after the timer has expired. Therefore I've added an if clause which makes sure that the timer is only started when the state is not already 'DISCONNECTED'.

See more details here: https://stackoverflow.com/questions/76457941/karma-hangs-for-30-seconds-after-successfully-executing-unit-tests

After successfully finishing all tests, karma hangs for 30 sec with this message:

Chrome Headless 114.0.5735.35 (Windows 10) ERROR
  Disconnected , because no message in 30000 ms.
Chrome Headless 114.0.5735.35 (Windows 10): Executed 634 of 634 DISCONNECTED (34.58 secs / 3.303 secs)
Chrome Headless 114.0.5735.35 (Windows 10) ERROR
Chrome Headless 114.0.5735.35 (Windows 10): Executed 634 of 634 DISCONNECTED (34.58 secs / 3.303 secs)

This only happens when executing more than approx 620 tests.

See more details here: https://stackoverflow.com/questions/76457941/karma-hangs-for-30-seconds-after-successfully-executing-unit-tests
@google-cla
Copy link

google-cla bot commented Jun 26, 2023

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@SebHeuze
Copy link

SebHeuze commented Nov 2, 2023

Thank you !
The only solution internet give for this problem is "Increase the timeout until it work", "increase browser inactivity timeout to 10min" it does not make sense.
And finally found your PR, I can finally fix this problem with a real solution !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants