Skip to content

Commit

Permalink
HOTFIX: fix StateManagerUtilTest and StreamTaskTest failures (apache#…
Browse files Browse the repository at this point in the history
…8247)

Reviewers: Guozhang Wang <[email protected]>
  • Loading branch information
Boyang Chen authored Mar 7, 2020
1 parent d3c067f commit c67e8bc
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
import java.io.File;
import java.io.IOException;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;

import static java.util.Collections.emptyList;
Expand Down Expand Up @@ -189,8 +188,6 @@ public void testShouldThrowWhenCleanAndWipeStateAreBothTrue() {
public void testCloseStateManagerClean() throws IOException {
expect(stateManager.taskId()).andReturn(taskId);

expect(stateManager.changelogPartitions()).andReturn(Collections.emptySet());

stateManager.close();
expectLastCall();

Expand All @@ -209,7 +206,6 @@ public void testCloseStateManagerClean() throws IOException {
@Test
public void testCloseStateManagerThrowsExceptionWhenClean() throws IOException {
expect(stateManager.taskId()).andReturn(taskId);
expect(stateManager.changelogPartitions()).andReturn(Collections.emptySet());
stateManager.close();
expectLastCall();

Expand All @@ -232,7 +228,6 @@ public void testCloseStateManagerThrowsExceptionWhenClean() throws IOException {
@Test
public void testCloseStateManagerOnlyThrowsFirstExceptionWhenClean() throws IOException {
expect(stateManager.taskId()).andReturn(taskId);
expect(stateManager.changelogPartitions()).andReturn(Collections.emptySet());
stateManager.close();
expectLastCall().andThrow(new ProcessorStateException("state manager failed to close"));

Expand All @@ -258,7 +253,6 @@ public void testCloseStateManagerDirtyShallSwallowException() throws IOException
final LogCaptureAppender appender = LogCaptureAppender.createAndRegister();

expect(stateManager.taskId()).andReturn(taskId);
expect(stateManager.changelogPartitions()).andReturn(Collections.emptySet());
stateManager.close();
expectLastCall().andThrow(new ProcessorStateException("state manager failed to close"));

Expand All @@ -281,7 +275,6 @@ public void testCloseStateManagerDirtyShallSwallowException() throws IOException
@Test
public void testCloseStateManagerWithStateStoreWipeOut() throws IOException {
expect(stateManager.taskId()).andReturn(taskId);
expect(stateManager.changelogPartitions()).andReturn(Collections.emptySet());
stateManager.close();
expectLastCall();

Expand All @@ -306,7 +299,6 @@ public void testCloseStateManagerWithStateStoreWipeOutRethrowWrappedIOException(
mockStatic(Utils.class);

expect(stateManager.taskId()).andReturn(taskId);
expect(stateManager.changelogPartitions()).andReturn(Collections.emptySet());
stateManager.close();
expectLastCall();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,6 @@ public void shouldAttemptToDeleteStateDirectoryWhenCloseDirtyAndEosEnabled() thr
EasyMock.expectLastCall();

EasyMock.expect(stateManager.taskId()).andReturn(taskId);
EasyMock.expect(stateManager.changelogPartitions()).andReturn(Collections.emptySet());

stateManager.close();
EasyMock.expectLastCall();
Expand Down

0 comments on commit c67e8bc

Please sign in to comment.