Two tests in TestDevMiningManager fail intermittently under coverage — observed roughly 2 failures in 8 local runs:
test_submit_job_with_parents
test_submit_job_with_propagate
Both submit TX1_DATA at its natural weight (~32) and then poll for completion with for _ in range(50): await asyncio.sleep(0.1) — a 5-second budget. The file's own comment describes that PoW as taking "a few seconds", so the margin is thin to begin with, and pytest --cov instrumentation slows the nonce loop enough to push it over. The failure surfaces as the poll loop exiting while the job is still mining, so the assertion reads as a wrong status rather than a timeout, which makes it easy to misread as a real regression.
Each test passes reliably in isolation and the suite passes without coverage, so nothing is wrong with the code under test — only with the budget the harness allows it.
Suggested fix: widen the poll budget in those tests (e.g. range(200) for 20s), or drop the tx weight the way TestSolveTx does for its trivial-weight case. No assertion changes needed.
Noticed while validating #173; it predates that PR and is unrelated to it, so it was deliberately left out of that changeset.
Acceptance criteria
- The two tests pass consistently with
pytest --cov over repeated runs.
Two tests in
TestDevMiningManagerfail intermittently under coverage — observed roughly 2 failures in 8 local runs:test_submit_job_with_parentstest_submit_job_with_propagateBoth submit
TX1_DATAat its natural weight (~32) and then poll for completion withfor _ in range(50): await asyncio.sleep(0.1)— a 5-second budget. The file's own comment describes that PoW as taking "a few seconds", so the margin is thin to begin with, andpytest --covinstrumentation slows the nonce loop enough to push it over. The failure surfaces as the poll loop exiting while the job is stillmining, so the assertion reads as a wrong status rather than a timeout, which makes it easy to misread as a real regression.Each test passes reliably in isolation and the suite passes without coverage, so nothing is wrong with the code under test — only with the budget the harness allows it.
Suggested fix: widen the poll budget in those tests (e.g.
range(200)for 20s), or drop the tx weight the wayTestSolveTxdoes for its trivial-weight case. No assertion changes needed.Noticed while validating #173; it predates that PR and is unrelated to it, so it was deliberately left out of that changeset.
Acceptance criteria
pytest --covover repeated runs.