mjsax commented on a change in pull request #10042: URL: https://github.com/apache/kafka/pull/10042#discussion_r610849890
########## File path: streams/src/test/java/org/apache/kafka/streams/tools/StreamsResetterTest.java ########## @@ -76,6 +78,35 @@ public void testResetToSpecificOffsetWhenBetweenBeginningAndEndOffset() { assertEquals(3, records.count()); } + @Test + public void testResetOffsetToSpecificOffsetWhenAfterEndOffset() { + final long[] beginningOffsets = {0L, 5L, 10L, 20L}; + final long[] endOffsets = {0L, 5L, 10L, 20L}; + // Test on multiple beginning and end offset combinations + for (int beginningOffsetIndex = 0; beginningOffsetIndex < beginningOffsets.length; beginningOffsetIndex++) { Review comment: I actually think that a single combination beginning=5 end=10 should be sufficient. ########## File path: streams/src/test/java/org/apache/kafka/streams/tools/StreamsResetterTest.java ########## @@ -247,6 +278,32 @@ public void shouldDetermineInternalTopicBasedOnTopicName1() { assertTrue(streamsResetter.matchesInternalTopicFormat("appId-KTABLE-FK-JOIN-SUBSCRIPTION-REGISTRATION-12323232-topic")); } + @Test + public void testResetToDatetimeWhenPartitionIsEmptyResetsToLatestOffset() { + final long[] beginningAndEndOffsets = {0L, 5L, 10L, 20L}; Review comment: So ensure that we really set to end, beginning and end should be set to different values, otherwise, we cannot distinguish both. Thus, similar to the test above, testing a single combination beginning=5 and end=10 seems sufficient? -- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org