Repository navigation
Add transaction tests for KafkaContainer and ConfluentKafkaContainer - #12102
aymenjamaaoui wants to merge 1 commit into
Conversation
|
Important Review skippedReview was skipped as selected files did not have any reviewable changes.
|
| Layer / File(s) | Summary |
|---|---|
Shared transactional test modules/kafka/src/test/java/org/testcontainers/AbstractKafka.java |
Creates a topic, sends and commits a record in a transaction, and asserts that a read_committed consumer receives exactly that record within 10 seconds. |
Container implementation coverage modules/kafka/src/test/java/org/testcontainers/kafka/ConfluentKafkaContainerTest.java, modules/kafka/src/test/java/org/testcontainers/kafka/KafkaContainerTest.java |
Adds tests that run the shared transactional test against Confluent Kafka 7.4.0 and apache/kafka-native:3.8.0. |
Estimated code review effort: 2 (Simple) | ~10 minutes
Change: Other
Suggested reviewers: eddumelendez
Merge Risk: 
Minimal · previous review ea074
-
This change only adds tests for Kafka transactions on both container types and does not change production behavior. No merge-blocking risk was found.
🚥 Pre-merge checks | ✅ 4 | ❌ 1
-
❌ Failed checks (1 warning)
Check name Status Explanation Resolution Docstring Coverage ⚠️ WarningDocstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 9 functions across 3 files. Write docstrings for the functions missing them to satisfy the coverage threshold. ✅ Passed checks (4 passed)
-
Check name Status Explanation Title check ✅ Passed The title clearly describes the main change: adding transaction tests for both Kafka container classes. Description check ✅ Passed The description explains the single-broker transaction issue, the tests being added, and the purpose of the change. It also references issue #1816.Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request. Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
-
Finishing Touches
-
Fix failing CI checks
-
- Commit to this branch
- Create a new PR
-
- Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Tip
🎯 Customize your risk assessments
-
Guide how CodeRabbit assesses merge risk and security architecture risk. Highlight sensitive changes and explain your security boundaries using Merge Risk Instructions and Security Risk Instructions in your review settings. Security architecture risk assessments require the Advanced plan or above.
✅ Automatic approvals, with your rules
-
Let CodeRabbit approve pull requests once required threads are resolved, pre-merge checks pass, and your risk limits are met. Enable Automatic approvals in review settings, with overrides for teams or file paths.
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
ℹ️ Recent review info
-
⚙️ Run configuration
-
- Configuration used: Repository UI
- Review profile: CHILL
- Plan: Advanced
- Run ID:
96dfbafb-59b6-4685-a288-1711129cab31
📒 Files selected for processing (3)
-
modules/kafka/src/test/java/org/testcontainers/AbstractKafka.java
modules/kafka/src/test/java/org/testcontainers/kafka/ConfluentKafkaContainerTest.java
modules/kafka/src/test/java/org/testcontainers/kafka/KafkaContainerTest.java
Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review.
ℹ️ Recent review info
-
⚙️ Run configuration
-
- Configuration used: Repository UI
- Review profile: CHILL
- Plan: Advanced
- Run ID:
96dfbafb-59b6-4685-a288-1711129cab31
📒 Files selected for processing (3)
-
modules/kafka/src/test/java/org/testcontainers/AbstractKafka.javamodules/kafka/src/test/java/org/testcontainers/kafka/ConfluentKafkaContainerTest.javamodules/kafka/src/test/java/org/testcontainers/kafka/KafkaContainerTest.java
Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review.
-
|
Hi! This is my first PR in this repository, so the CI workflows are waiting for approval. Could a maintainer please approve them when you have time? Thank you! |
ea074e5 to
14c6182
Compare
Kafka transactions need
transaction.state.log.replication.factorandtransaction.state.log.min.isrset to 1 on a single broker. Without them,initTransactions()times out while waiting forInitProducerId.KafkaContainerandConfluentKafkaContaineralready set these values, but no test checks it. This PR adds a test for each class. The test commits a transaction and reads the message with aread_committedconsumer.Refs #1816
Summary by CodeRabbit