thswlsqls opened a new issue, #17326:
URL: https://github.com/apache/iceberg/issues/17326

   **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.
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to