cadonna commented on code in PR #13269: URL: https://github.com/apache/kafka/pull/13269#discussion_r1149189233
########## streams/src/test/java/org/apache/kafka/streams/processor/internals/StreamTaskTest.java: ########## @@ -1699,7 +1705,8 @@ public void shouldReturnOffsetsForRepartitionTopicsForPurging() { consumer.assign(asList(partition1, repartition)); consumer.updateBeginningOffsets(mkMap(mkEntry(repartition, 0L))); - EasyMock.expect(stateManager.changelogPartitions()).andReturn(Collections.emptySet()); + EasyMock.expect(stateManager.changelogOffsets()).andReturn(Collections.emptyMap()); // restoration checkpoint + EasyMock.expect(stateManager.changelogPartitions()).andReturn(Collections.emptySet()).times(2); Review Comment: Since for this test these calls are just stubs (i.e., nothing needs to be verified about these calls), I would replace them with: ```suggestion EasyMock.expect(stateManager.changelogOffsets()).andStubReturn(Collections.emptyMap()); // restoration checkpoint EasyMock.expect(stateManager.changelogPartitions()).andStubReturn(Collections.emptySet()); ``` ########## streams/src/test/java/org/apache/kafka/streams/processor/internals/StreamTaskTest.java: ########## @@ -1503,7 +1505,9 @@ public void shouldReadCommittedOffsetAndRethrowTimeoutWhenCompleteRestoration() public void shouldReInitializeTopologyWhenResuming() throws IOException { stateDirectory = EasyMock.createNiceMock(StateDirectory.class); EasyMock.expect(stateDirectory.lock(taskId)).andReturn(true); + EasyMock.expect(recordCollector.offsets()).andReturn(Collections.emptyMap()); // restoration checkpoint EasyMock.expect(recordCollector.offsets()).andThrow(new AssertionError("Should not try to read offsets")).anyTimes(); Review Comment: nit: ```suggestion EasyMock.expect(recordCollector.offsets()).andReturn(Collections.emptyMap()) .andThrow(new AssertionError("Should not try to read offsets")).anyTimes(); ``` -- 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: jira-unsubscr...@kafka.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org