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


##########
streams/test-utils/src/main/java/org/apache/kafka/streams/test/TestRecord.java:
##########
@@ -209,14 +243,44 @@ public Instant getRecordTime() {
         return recordTime;
     }
 
+    /**
+     * @return the partition number, or {@code -1} if no partition was 
explicitly set
+     */
+    public int getPartition() {
+        return partition;
+    }
+
+    /**
+     * Compares this record to {@code o} without considering the {@code 
partition} field.
+     *
+     * <p>Use this in tests that do not care about which partition a record 
was routed to:
+     * <pre>{@code
+     * assertTrue(expected.equalsIgnorePartition(actual));
+     * }</pre>
+     *
+     * @param o the record to compare against; {@code null} returns {@code 
false}

Review Comment:
   done



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