sebastienviale commented on code in PR #22612:
URL: https://github.com/apache/kafka/pull/22612#discussion_r3450460426


##########
streams/test-utils/src/main/java/org/apache/kafka/streams/test/TestRecord.java:
##########
@@ -151,6 +177,7 @@ public TestRecord(final ProducerRecord<K, V> record) {
         this.value = record.value();
         this.headers = record.headers();
         this.recordTime = Instant.ofEpochMilli(record.timestamp());
+        this.partition = record.partition() != null ? record.partition() : 
NO_PARTITION;

Review Comment:
   Finally, after review, for consistency with the timestamp handling in the 
same constructor, I'll keep the defensive throw for negative partitions as well.



-- 
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]

Reply via email to