clolov commented on code in PR #14679:
URL: https://github.com/apache/kafka/pull/14679#discussion_r1377995728
##########
streams/src/test/java/org/apache/kafka/streams/processor/internals/StandbyTaskTest.java:
##########
@@ -401,17 +355,11 @@ public void
shouldOnlyNeedCommitWhenChangelogOffsetChanged() {
task.prepareCommit();
task.postCommit(true);
-
- EasyMock.verify(stateManager);
}
@Test
public void shouldThrowOnCloseCleanError() {
-
EasyMock.expect(stateManager.changelogOffsets()).andStubReturn(Collections.emptyMap());
- stateManager.close();
- EasyMock.expectLastCall().andThrow(new
RuntimeException("KABOOM!")).anyTimes();
-
EasyMock.expect(stateManager.changelogPartitions()).andReturn(Collections.singleton(partition)).anyTimes();
Review Comment:
A majority of these setup statements have also been removed because
according to Mockito they do not get called. I have further confirmed that
removing these statements in the EasyMock world does not break the tests.
##########
streams/src/test/java/org/apache/kafka/streams/processor/internals/StandbyTaskTest.java:
##########
@@ -184,10 +187,7 @@ public void
shouldThrowLockExceptionIfFailedToLockStateDirectory() throws IOExce
@Test
public void shouldTransitToRunningAfterInitialization() {
-
EasyMock.expect(stateManager.changelogOffsets()).andStubReturn(Collections.emptyMap());
Review Comment:
Quite a lot of these setup statements have been removed as the default
Mockito behaviour is to return empty collections and the strict stubbing
detects them and asks for them to be removed.
--
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]