Skip to content

test: re-enable recoverable skipped tests (+ fix latent LazySpan bug)#719

Closed
wbarnha wants to merge 1 commit into
claude/pypy-agen-cleanupfrom
claude/reenable-skipped-tests
Closed

test: re-enable recoverable skipped tests (+ fix latent LazySpan bug)#719
wbarnha wants to merge 1 commit into
claude/pypy-agen-cleanupfrom
claude/reenable-skipped-tests

Conversation

@wbarnha

@wbarnha wbarnha commented Jul 20, 2026

Copy link
Copy Markdown
Member

Description

Follow-up to #716. Sweeps the suite's 20 legacy unconditional @pytest.mark.skip("Needs fixing"/"Fix is TBD") tests, re-enabling every one that can be made green and fixing a real bug a skip was hiding. Stacked on claude/pypy-agen-cleanup (#716) — retarget to master once that merges.

Re-enabled (7 tests)

  • Real bug fix — faust/transport/drivers/aiokafka.py: _transform_span_lazy assigned the raw, unbound LazySpan.finish to span.finish, so the later span.finish() raised TypeError: finish() missing 1 required positional argument: 'self'. Lazy spans are used whenever tracing is enabled, so this was a latent crash — the four skipped test_transform_span_* tests were masking it. Bound the method to the span; 4 tests re-enabled.
  • test_aiokafka.py stream-idle VEP (2): _make_slow_processing_error grew setting/current_value params and now bakes the explanation into the message, so log.error no longer gets those as kwargs. Updated the two stale expectations.
  • test_agent.py::test_execute_actor__cancelled_running (1): "Fix is TBD" — passes as-is now (skip rot).

Attempted, still skipped — but with precise reasons (was "Needs fixing")

  • test_aiokafka.py fetch-timeout VEP asserts ×3 — verify_event_path no longer emits the error() under those conditions (driver behaviour drift); _commit mock tests ×3 — offsets no longer flow to the wrapped AIOKafkaConsumer.commit in that harness. Both need real test re-derivation.

Attempted, left as-is (need infra / dependency-API work)

Documented here rather than re-skipped in code:

Test(s) Why it can't just be re-enabled
test_cache.py redis scheme (2) Attempt a live Redis connection; redis-py removed StrictRedis
test_rocksdb.py::test_open_rocksdict rocksdict's Options() no longer takes constructor args
test_consumer.py TransactionManager (2) stop_transaction call-count / expected-calls drift
test_base.py::test_compat_option CLI compat-option callback path changed
test_consistency.py Module import fails on current aiokafka (GroupCoordinatorRequest_v0 removed); this dir isn't in the CI suite

Verification

tests/unit/transport + tests/unit/agents/test_agent.py598 passed, 16 skipped, 0 failed on CPython; flake8/black/isort clean.

🤖 Generated with Claude Code


Generated by Claude Code

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

wbarnha commented Jul 20, 2026

Copy link
Copy Markdown
Member Author

Closing in favour of #723, which now contains this work rebased directly onto master (independent of the PyPy branch it was previously stacked on) plus the follow-up aiokafka/CLI re-enablements. No content is lost — it all lives in #723.


Generated by Claude Code

@wbarnha wbarnha closed this Jul 20, 2026
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.

1 participant