MINOR: Replace null with an actual value for timestamp field in InsertField SMT unit tests#8649
Conversation
Signed-off-by: Arjun Satish <arjun@confluent.io>
|
@rhauch @kkonstantine @C0urante small addition here. reviews appreciated. thanks in advance! |
|
The code looks good; I'm just a little curious about why we'd want to do a separate test here instead of altering the existing tests to all (or nearly all) use actual timestamp values instead of |
|
The other tests seemed to be testing for the empty timestamp case. Hence the new test, also helps keep the new test precise to a usecase. I'd prefer to just add another case for the schema case, if that is the main concern that made you thin that way, @C0urante. WDYT? |
|
I think changing the empty timestamp cases to use a real timestamp instead might be fine here. The |
Signed-off-by: Arjun Satish <arjun@confluent.io>
|
@C0urante updated the test. it should cover both schema and schemaeless cases in existing tests. let me know if that works. |
|
@wicknicks I understand that the current tests were taking a shortcut by not filling out a the timestamp field with an actual value. But other than observing this omission, is there another motivation behind this change that we'd need to take into account and include in the description of this PR? |
|
@kkonstantine a Connector was not setting the field correctly in a local setup, and I was digging into why this is the case. to check if the SMT is correct, I looked at the tests, and they were all checking nulls, as you pointed out. Hence, the update, so we have clarity on what the expected input is, and what the output should be. |
kkonstantine
left a comment
There was a problem hiding this comment.
Sounds good. Thanks for improving these tests.
LGTM
|
jdk14 green, jdk 11 failed on 1 flaky test, jdk 8 failed to run, but that's ok. |
|
Thanks, @kkonstantine and @C0urante! |
* 'trunk' of github.com:apache/kafka: MINOR: add option to rebuild source for system tests (apache#6656) KAFKA-9850 Move KStream#repartition operator validation during Topolo… (apache#8550) MINOR: Add a duplicate() method to Message classes (apache#8556) KAFKA-9966: add internal assignment listener to stabilize eos-beta upgrade test (apache#8648) MINOR: Replace null with an actual value for timestamp field in InsertField SMT unit tests (apache#8649) MINOR: Fix ProcessorContext JavaDocs and stream-time computation (apache#8603) MINOR: improve tests for TopologyTestDriver (apache#8631) KAFKA-9821: consolidate Streams rebalance triggering mechanisms (apache#8596) KAFKA-9669; Loosen validation of inner offsets for older message formats (apache#8647) KAFKA-8770: KIP-557: Drop idempotent KTable source updates (apache#8254) MINOR: Remove allow concurrent test (apache#8641)
…tField SMT unit tests (apache#8649) Add actual values instead of just passing null in unit tests that check the behavior of the InsertField SMT when trying to insert a field that takes its value from the Kafka record timestamp. Reviewers: Chris Egerton <chrise@confluent.io>, Konstantine Karantasis <konstantine@confluent.io>
Signed-off-by: Arjun Satish arjun@confluent.io
PR adds a unit test to check the behavior of the InsertField SMT when trying to insert a field that takes its value from the Kafka record timestamp. All other tests currently pass a null value for the record timestamp.
Committer Checklist (excluded from commit message)