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 coverage not covering sub-process #28

Closed
imranariffin opened this issue Aug 29, 2022 · 0 comments
Closed

Fix coverage not covering sub-process #28

imranariffin opened this issue Aug 29, 2022 · 0 comments

Comments

@imranariffin
Copy link
Owner

Since #20, in some tests (e.g.
test_integration.test_sync_and_async_parity__simple_app) we're
starting the worker in a sub-process, and coverage doesn't count
anything in worker.py. I tried following this guide, but I couldn't get it to work. Maybe I missed something.

We should consider either:

  1. Start the worker using multiprocessing instead of subprocess
  2. Somehow follow the guide correctly
imranariffin added a commit that referenced this issue Jul 21, 2023
This way, coverage can collect data before process termination
imranariffin added a commit that referenced this issue Jul 22, 2023
This way, coverage can collect data before process termination

Signed-off-by: Imran Ariffin <ariffin.imran@gmail.com>
imranariffin added a commit that referenced this issue Jul 22, 2023
Ensure sigterm is handled by coverage. This way, coverage can collect data before process termination

Issue was coverage does not handle sigterm by default, so it couldn't get to collect data upon termination: nedbat/coveragepy#1307 (comment)

Need to explicitly tell coverage to handle sigterm: https://coverage.readthedocs.io/en/latest/changes.html#version-6-4-2022-05-22

Signed-off-by: Imran Ariffin <ariffin.imran@gmail.com>
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

No branches or pull requests

1 participant