Kafka Connect: DebeziumTransform tombstone path is not covered by any test
Nobody has claimed this yet.
Assessment
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Newbie friendliness
- 92/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- java, kafka
- Domain
- testing-qa
Research direction
Start in kafka-connect/kafka-connect-transforms/src/test/java/org/apache/iceberg/connect/transforms/TestDebeziumTransform.java, especially testDmsTransformNull(), and compare it with DebeziumTransform.apply() at the tombstone path. Run the module tests after making the test exercise DebeziumTransform and verify that the record is returned as-is.
Written by the indexing model from the issue text.
Description
Apache Iceberg version
main @ 8550723a7
Query engine
None (Kafka Connect SMT module, engine-agnostic)
Please describe the bug
This is a test coverage gap, not a production defect.
TestDebeziumTransform.testDmsTransformNull() (kafka-connect/kafka-connect-transforms/src/test/java/org/apache/iceberg/connect/transforms/TestDebeziumTransform.java line 62-69) instantiates DmsTransform, not DebeziumTransform.
TestDmsTransform.testDmsTransformNull() (line 50-57) already contains the same test verbatim, so the copy in TestDebeziumTransform verifies nothing additional.
As a result, the tombstone pass-through branch in DebeziumTransform.apply() (DebeziumTransform.java line 66-67) is not exercised by any test in the module. The other two tests in the class only feed events that carry a value.
The four sibling SMT tests each cover their own null path: TestDmsTransform line 51, TestCopyValue line 35, TestJsonToMapTransform line 54, TestKafkaMetadataTransform line 48. TestDebeziumTransform is the only one that does not.
Steps to reproduce
Remove line 66-67 from DebeziumTransform.apply() and run the module tests. Everything still passes, because no test reaches that branch.
Additional context
Origin: commit 7d9e96f9f6 ("Kafka Connect: Add SMTs for Debezium and AWS DMS", #11936) added DebeziumTransform and DmsTransform in one commit; the null test was copied between the two test classes without switching the class under test.
Fix: instantiate DebeziumTransform and assert the record is returned as-is.
- Dominant language
- Java
- Stars
- 9.3k
- Forks
- 3.5k
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 143
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from apache/iceberg
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
improvement
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
infinispan/infinispan#18150 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
untriaged
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
opensearch-project/k-NN#3597 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100