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


##########
streams/test-utils/src/main/java/org/apache/kafka/streams/TopologyTestDriver.java:
##########
@@ -837,7 +846,9 @@ <K, V> TestRecord<K, V> readRecord(final String topic,
         }
         final K key = keyDeserializer.deserialize(record.topic(), 
record.headers(), record.key());
         final V value = valueDeserializer.deserialize(record.topic(), 
record.headers(), record.value());
-        return new TestRecord<>(key, value, record.headers(), 
record.timestamp());
+        final int outputPartition = -1;

Review Comment:
   Well, in the KIP it is specified that single-partition mode will carry 
partition 0.
   
   In that case, all existing tests that compare a `TestRecord` via 
`equals()`/`equalTo()` against an expected record built from a partition-less 
constructor will fail (e.g. the test below), since the expected record defaults 
to partition `-1` while the actual output record would now carry `0`.
   
   For example: 
   
https://github.com/apache/kafka/blob/4a2edef51415883fc6539981d5860b4efc13f6a6/streams/test-utils/src/test/java/org/apache/kafka/streams/TestTopicsTest.java#L268-L282
   
   If we change it to 0 now, we'll need to update all the affected tests. We 
can do that now in this PR, or in a follow-up PR.



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