sebastienviale opened a new pull request, #22612: URL: https://github.com/apache/kafka/pull/22612
**Motivation** As part of [KIP-1238: Multi-partition support in TopologyTestDriver.](https://cwiki.apache.org/confluence/display/KAFKA/KIP-1238%3A+Multipartition+for+TopologyTestDriver+in+Kafka+Streams) TestRecord needs to carry partition information so that records produced and consumed by TopologyTestDriver can expose the partition they belong to. This is a prerequisite for supporting multi-partition testing with TopologyTestDriver. **Changes** This PR updates TestRecord by: - adding a partition field; - adding constructors that allow specifying the partition explicitly; - preserving existing constructors, which continue to default the partition to -1 (unspecified); - including the partition in equals(), hashCode(), and toString(); - adding equalsIgnorePartition() for tests that do not care about the partition. **Compatibility** Existing TestRecord constructors remain unchanged and continue to assign partition = -1. Since no component currently sets a partition value, records created through existing APIs continue to carry partition = -1, preserving the behavior of existing tests. This PR is intentionally limited to introducing partition support in TestRecord. Follow-up PRs will add multi-partition support to TopologyTestDriver. -- 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]
