test: re-enable recoverable skipped tests (+ fix latent LazySpan bug)#728
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #728 +/- ##
==========================================
+ Coverage 94.37% 95.02% +0.65%
==========================================
Files 104 104
Lines 11158 11158
Branches 1203 1203
==========================================
+ Hits 10530 10603 +73
+ Misses 529 461 -68
+ Partials 99 94 -5 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
wbarnha
enabled auto-merge
July 21, 2026 11:12
Sweep the suite's legacy `@pytest.mark.skip("Needs fixing")` tests and
re-enable the ones that can be made green, fixing a real bug found along the
way.
* fix(aiokafka): bind the lazy span's replacement `finish`. `LazySpan.finish`
was assigned to `span.finish` as a raw (unbound) function, so the later
`span.finish()` call raised "missing 1 required positional argument:
'self'". Lazy spans are used whenever tracing is enabled, so this was a
latent crash; the skipped `test_transform_span_*` tests were hiding it.
Re-enables the four transform-span tests.
* test(aiokafka): the two stream-idle VEP tests called the 2-arg
`_make_slow_processing_error`; it now takes `setting`/`current_value` and
bakes the explanation into the message, so `log.error` no longer receives
those as kwargs. Updated the expectations and re-enabled them.
* test(agent): `test_execute_actor__cancelled_running` (was "Fix is TBD")
passes as-is now -- skip rot -- re-enabled.
The remaining previously-skipped tests need per-test work beyond a re-enable
and stay skipped, but with precise reasons replacing "Needs fixing": the
fetch-timeout VEP asserts (driver behaviour drift) and the `_commit` mock
tests in test_aiokafka.py. Tests needing live infrastructure or a
dependency API refresh (redis cache backend, rocksdb `Options`, the
transaction-manager mocks, the CLI compat-option test, tests/consistency's
stale aiokafka import) are left as they were.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HHPL4VFWQRQPpjR1gXSKyL
Continues the skipped-test sweep from the parent branch.
aiokafka (tests/unit/transport/drivers/test_aiokafka.py):
* Test_VEP_no_fetch_since_start::test_timed_out -- the base _consumer fixture
stamps a current poll timestamp, so the NO_FETCH_SINCE_START branch (fires
only when the partition has no poll timestamp yet) could never trigger. Set
state_value().timestamp = None (the real "no fetch request ever sent"
condition) and tighten the asserted tp. Now green.
* test__commit / __CommitFailedError / __IllegalStateError -- _commit filters
offsets by self.assignment() before building the payload; the fixture's
assignment didn't contain TP1, so every offset was filtered out
(commit({})). Point the mocked assignment at TP1 so offsets flow through.
Also dropped the stale supervisor.wakeup() assertions -- those calls were
intentionally removed from _commit's error handlers in 2020 (commit
8d6758f); the crash(exc)/returns-False assertions are kept.
CLI (tests/unit/cli/test_base.py):
* test_compat_option -- the old test asserted on a Mock (option(ctx)._callback
is a Mock attribute, never 33). compat_option wires the real callback via the
click `callback=` kwarg; grab it from opt.kwargs["callback"] and assert its
actual behaviour against faust/cli/base.py: ensure_object(State), value
returned unchanged, stored on the State only when the previous value is None
and the value differs from the option default.
Two response-staleness VEP tests stay skipped, now with an accurate reason:
SLOW_PROCESSING_NO_RESPONSE_SINCE_START and SLOW_PROCESSING_NO_RECENT_RESPONSE
are defined in the driver but never emitted (the broker-response-staleness
tracking was dropped), so they cannot pass without re-adding that source
feature -- out of scope for a test-only change.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HHPL4VFWQRQPpjR1gXSKyL
wbarnha
force-pushed
the
claude/reenable-remaining-skipped-tests
branch
from
July 21, 2026 11:18
055d087 to
db3c72d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Re-opens #723 onto
master. #723 was merged into its stale stacked-parent branch (claude/pypy-agen-cleanup) instead ofmaster, so its content never reachedmaster. This branch is the same two commits rebased directly ontomaster, independent of any chain.Re-enables the recoverable
@pytest.mark.skiptests across the aiokafka driver, agents, and CLI, and fixes a real bug a skip was hiding.Re-enabled (test-only unless noted)
faust/transport/drivers/aiokafka.py+test_aiokafka.py_transform_span_lazyassigned the unboundLazySpan.finishtospan.finish, sospan.finish()crashed withmissing 1 required positional argument: 'self'. Lazy spans run whenever tracing is enabled — a latent crash the 4test_transform_span_*tests were masking. Bound it to the span. (source fix)Test_VEP_stream_idle_*(2) — updated for the_make_slow_processing_error(msg, causes, setting, current_value)signature.Test_VEP_no_fetch_since_start::test_timed_out— setstate_value().timestamp = Noneso theNO_FETCH_SINCE_STARTbranch can fire.test__commit/__CommitFailedError/__IllegalStateError(3) — point the mockedassignment()atTP1; drop the stalesupervisor.wakeup()asserts (removed from_commitin 2020).test_agent.py—test_execute_actor__cancelled_runningpasses as-is now (skip rot).test_base.py—test_compat_optionnow grabs the realcallbackclosure and checks its behaviour againstfaust/cli/base.py.Left skipped — genuine source gap (flagged, not forced)
Test_VEP_no_response_since_start::test_timed_outandTest_VEP_no_recent_response::test_timed_outstay skipped:SLOW_PROCESSING_NO_RESPONSE_SINCE_START/NO_RECENT_RESPONSEare defined in the driver but never emitted. Out of scope for a test-only change; worth a follow-up.Verification
test_aiokafka.py+test_agent.py+test_base.py→ 295 passed, 3 skipped, 0 failed on CPython; flake8/black/isort clean.🤖 Generated with Claude Code
Generated by Claude Code