test(python): default-run unit tests for kafka and kdb bindings (step 13.g) - #403
Open
0-jake-0 wants to merge 1 commit into
Open
test(python): default-run unit tests for kafka and kdb bindings (step 13.g)#4030-jake-0 wants to merge 1 commit into
0-jake-0 wants to merge 1 commit into
Conversation
The adapter skill (step 13.g) requires every adapter whose bindings compile in the default build to ship unit-level Python tests that run without a live service, so the binding module stays visible in coverage and marshaling-glue regressions are caught. kafka and test_kdb only had `-m requires_*` integration tests, which the default `pytest` run deselects. Add, with no marker (run by default): - kafka: TestKafkaConstruction (sub/pub wiring, fluent .kafka_pub) and TestKafkaUnreachable (dict_to_record marshaling runs on the upstream tick, then delivery to an unreachable broker fails; covers single dict, list of dicts, and the non-dict/list fallthrough that emits an empty burst). - kdb: TestKdbConstruction (read/write wiring, #[pyo3(signature)] defaults) and TestKdbUnreachable (connect-error path via ECONNREFUSED on loopback port 1 for both read and write). Note: the kafka and fluvio *Rust* integration tests already run in CI via the adapter-integration.yml matrix (kafka-integration-test, fluvio-integration-test), so no new Rust workflows are needed.
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.
Part 2 of 4 from the adapter compliance review. Closes the step-13.g gap: every adapter whose Python bindings compile in the default build must ship unit-level tests that run without a live service, so the binding module stays visible in coverage and pyo3 marshaling-glue regressions are caught.
test_kafka.pyandtest_kdb.pypreviously had only-m requires_*integration tests, which the defaultpytestrun deselects — contributing nothing to default coverage.Added (no marker — run by default)
kafka (
tests/test_kafka.py)TestKafkaConstruction—kafka_sub/ fluent.kafka_pub()wiring without connecting.TestKafkaUnreachable—dict_to_recordruns on the upstream tick, then delivery to an unreachable broker (127.0.0.1:1) fails and propagates. Covers single dict, list of dicts, and the non-dict/list fallthrough that emits an empty burst. (Bounded by the producer'smessage.timeout.ms=5000, so these take a few seconds.)kdb (
tests/test_kdb.py)TestKdbConstruction—kdb_read/ fluent.kdb_write()wiring and#[pyo3(signature)]defaults.TestKdbUnreachable— connect-error path via ECONNREFUSED on loopback port 1, for both read (historical) and write.On the CI findings (#3, #4) — no workflows needed
The review flagged "no Rust CI for kafka/fluvio integration tests." On inspection that is a false positive:
.github/workflows/adapter-integration.ymlis a matrix over fix, fluvio, kafka, zmq that already runscargo test --features <adapter>-integration-test, and it is wired intointegration-tests.ymlas theadapter-integrationjob. So the Rust integration suites for kafka and fluvio already run in CI — no standalonekafka-integration.yml/fluvio-integration.ymlis required.(The fluvio Python
requires_fluviomarker — added in the part-1 PR — is exercised manually against a local cluster; a full SC+SPU topology isn't reliably reproducible as a standalone CI service, and the fluvio round-trip is already covered at the Rust layer.)Verification
Built
wingfoil-pythonwithmaturin developand ran the new suites:Default collection deselects the
requires_kafka/requires_kdbintegration classes (6 deselected) and picks up the new unit tests.https://claude.ai/code/session_01JLqvwSW8V4xPpvxV1vwXuX
Generated by Claude Code