clolov commented on code in PR #14679:
URL: https://github.com/apache/kafka/pull/14679#discussion_r1378794890
##########
streams/src/test/java/org/apache/kafka/streams/processor/internals/StandbyTaskTest.java:
##########
@@ -201,49 +201,37 @@ public void shouldTransitToRunningAfterInitialization() {
task.initializeIfNeeded();
assertEquals(RUNNING, task.state());
-
- EasyMock.verify(stateManager);
}
@Test
public void shouldThrowIfCommittingOnIllegalState() {
- EasyMock.replay(stateManager);
task = createStandbyTask();
task.suspend();
task.closeClean();
assertThrows(IllegalStateException.class, task::prepareCommit);
}
-
@Test
public void shouldAlwaysCheckpointStateIfEnforced() {
- stateManager.flush();
- EasyMock.expectLastCall().once();
- stateManager.checkpoint();
- EasyMock.expectLastCall().once();
-
EasyMock.expect(stateManager.changelogOffsets()).andReturn(Collections.emptyMap()).anyTimes();
- EasyMock.replay(stateManager);
+ doNothing().when(stateManager).flush();
Review Comment:
I have changed all `.expectLastCall().once()` statements into `verify`
statements
--
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]