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
Explicitly test for ipdevpoll subprocess pool timeouts #2548
Labels
Comments
The "uncovered" methods appear to be nav/python/nav/ipdevpoll/pool.py Lines 291 to 321 in 2d7b2a0
and nav/python/nav/ipdevpoll/pool.py Lines 342 to 356 in 2d7b2a0
|
lunkwill42
changed the title
Explicitly test for ipdevpool subprocess pool timeouts
Explicitly test for ipdevpoll subprocess pool timeouts
Jan 10, 2023
lunkwill42
added a commit
to lunkwill42/nav
that referenced
this issue
Mar 23, 2023
Explicit coverage of the worker ping and euthanization methods did not exist. Instead, these methods would "accidentally" receive coverage in some test runs, and not at all in others. This would cause coverage stats to flip back and forth, and codecov.io would fail seemingly random PRs for decreasing coverage of these methods. Fixes Uninett#2548
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
We are seeing intermittent coverage failures on pull requests, specifically related to the nav.ipdevpoll.pool module. Codecov fails the PRs because it seems that the PR has reduced the coverage of the
pool
module, yet we never see any of these PRs actually touching any relevant code that would reduce the coverage of this file.The code lines that have "lost" coverage all deal with the handling of process pool workers that time out and need to be euthanized.
Working theory: It is likely that what is happening is that there is no test that tests explicitly for a ipdevpoll process pool worker timeout/euthanization incident. This just happens randomly on some tests, likely due to timing issues. Whenever this occurs in a test suite run, the timeout handlers are run, ensuring that a new worker gets the job, but the tests are otherwise unaffected - and the timeout handlers get covered. However, when the test suite later runs and the timeouts do not happen, the coverage is apparently reduced.
One of the latest PRs this explicitly happened was #2545. The link to the coverage report is here (but this may become outdated by the time the PR is merged): https://app.codecov.io/gh/Uninett/nav/pull/2545
The text was updated successfully, but these errors were encountered: