Skip to content

[otap-dataflow] Kafka shared test helper#3563

Open
c1ly wants to merge 4 commits into
open-telemetry:mainfrom
c1ly:kafka-test-suite
Open

[otap-dataflow] Kafka shared test helper#3563
c1ly wants to merge 4 commits into
open-telemetry:mainfrom
c1ly:kafka-test-suite

Conversation

@c1ly

@c1ly c1ly commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Change Summary

Added a shared test helper for the kafka reciever and exporter that spins up a broker using the rdkafka mock cluster broker. This test helper streamlines the kafka integration tests and will be used to validate the kafka receiver and exporter with edge cases such as when a consumer leaves and joins the consumer group causing rebalance. This test helper simplifies the component connection to the broker, allows inspection of the broker state, and can perform fault injections and rebalance scenarios.

What issue does this PR close?

How are these changes tested?

Updated kafka tests and added example tests using the test suite

Are there any user-facing changes?

no

Changelog

  • Added a .chloggen/*.yaml entry

@c1ly
c1ly requested a review from a team as a code owner July 23, 2026 16:55
@github-actions github-actions Bot added area:pipeline Rust Pipeline Related Tasks lang:rust Pull requests that update Rust code area:exporter Core and Contrib exporter nodes area:receiver Core and Contrib receiver nodes size/XL labels Jul 23, 2026
@c1ly c1ly changed the title add kafka test suite [otap-dataflow] Kafka shared test helper Jul 23, 2026
@opentelemetry-pr-dashboard

opentelemetry-pr-dashboard Bot commented Jul 23, 2026

Copy link
Copy Markdown

Pull request dashboard status

Status last refreshed: 2026-07-25 22:03:01 UTC.

  • Waiting on: Reviewers
  • Next step: Review the latest changes.

This automated status or its linked feedback items may be incorrect. If something looks wrong, please report it with the result you expected.

@codecov

codecov Bot commented Jul 23, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 70.37896% with 383 lines in your changes missing coverage. Please review.
✅ Project coverage is 86.79%. Comparing base (34e6604) to head (2ef1ce1).

❌ Your patch check has failed because the patch coverage (70.37%) is below the target coverage (80.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3563      +/-   ##
==========================================
- Coverage   86.88%   86.79%   -0.09%     
==========================================
  Files         782      792      +10     
  Lines      319391   320010     +619     
==========================================
+ Hits       277498   277755     +257     
- Misses      41369    41731     +362     
  Partials      524      524              
Components Coverage Δ
otap-dataflow 87.84% <70.37%> (-0.11%) ⬇️
query_engine 89.57% <ø> (ø)
otel-arrow-go 52.45% <ø> (ø)
quiver 92.20% <ø> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@lquerel lquerel left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Made few suggestions to improve this test helper.

Comment thread rust/otap-dataflow/crates/contrib-nodes/src/common/kafka/node_harness.rs Outdated
Comment thread rust/otap-dataflow/crates/contrib-nodes/src/common/kafka/node_harness.rs Outdated
Comment thread rust/otap-dataflow/crates/contrib-nodes/src/common/kafka/test/consumer.rs Outdated
Comment thread rust/otap-dataflow/crates/contrib-nodes/src/common/kafka/test/consumer.rs Outdated
Comment thread rust/otap-dataflow/crates/contrib-nodes/src/common/kafka/test/demo_tests.rs Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:exporter Core and Contrib exporter nodes area:pipeline Rust Pipeline Related Tasks area:receiver Core and Contrib receiver nodes lang:rust Pull requests that update Rust code size/XL

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

Kafka test suite

2 participants