Skip to content

[connectors] Tolerate transient Kafka errors in FT input tests#6588

Merged
ryzhyk merged 1 commit into
mainfrom
fix-kafka-ft-test-transient-errors
Jul 3, 2026
Merged

[connectors] Tolerate transient Kafka errors in FT input tests#6588
ryzhyk merged 1 commit into
mainfrom
fix-kafka-ft-test-transient-errors

Conversation

@ryzhyk

@ryzhyk ryzhyk commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Transient librdkafka connectivity blips ("AllBrokersDown", "N/M brokers are down") are reported to the consumer as non-fatal errors, and the connector recovers on its own. DummyInputConsumer recorded every such error in the strict call sequence that expect() checks, so a blip anywhere in a test failed it, e.g.:

thread 'transport::kafka::ft::test::multiple_input' panicked at
crates/adapters/src/transport/kafka/ft/test.rs:463:22:
assertion left == right failed
left: [Extended { num_records: 90, ... }]
right: [Error(false)]

Record only fatal errors. No test expects ConsumerCall::Error, so no expectation changes.

Transient librdkafka connectivity blips ("AllBrokersDown", "N/M brokers
are down") are reported to the consumer as non-fatal errors, and the
connector recovers on its own. DummyInputConsumer recorded every such
error in the strict call sequence that expect() checks, so a blip
anywhere in a test failed it, e.g.:

  thread 'transport::kafka::ft::test::multiple_input' panicked at
  crates/adapters/src/transport/kafka/ft/test.rs:463:22:
  assertion `left == right` failed
    left: [Extended { num_records: 90, ... }]
   right: [Error(false)]

Record only fatal errors. No test expects ConsumerCall::Error, so no
expectation changes.

Signed-off-by: Leonid Ryzhyk <ryzhyk@gmail.com>
@ryzhyk
ryzhyk requested a review from blp July 3, 2026 13:39
@ryzhyk ryzhyk added the connectors Issues related to the adapters/connectors crate label Jul 3, 2026
@ryzhyk
ryzhyk enabled auto-merge July 3, 2026 13:39

@mythical-fred mythical-fred left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clean fix. Non-fatal Kafka errors are transient and cosmetic from the test's perspective — swallowing them from the call sequence is the right move since the connector's own recovery path is what actually needs to be exercised, and the Error(true) case is still recorded so real fatal errors don't get masked. LGTM.

@ryzhyk
ryzhyk added this pull request to the merge queue Jul 3, 2026
@mihaibudiu mihaibudiu changed the title [adapters] Tolerate transient Kafka errors in FT input tests [connectors] Tolerate transient Kafka errors in FT input tests Jul 3, 2026
Merged via the queue into main with commit 7ebce1a Jul 3, 2026
1 check passed
@ryzhyk
ryzhyk deleted the fix-kafka-ft-test-transient-errors branch July 3, 2026 17:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

connectors Issues related to the adapters/connectors crate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants