From c67e8bc542bde47ac52d065a797037812860b163 Mon Sep 17 00:00:00 2001 From: Boyang Chen Date: Fri, 6 Mar 2020 22:13:54 -0800 Subject: [PATCH] HOTFIX: fix StateManagerUtilTest and StreamTaskTest failures (#8247) Reviewers: Guozhang Wang --- .../streams/processor/internals/StateManagerUtilTest.java | 8 -------- .../kafka/streams/processor/internals/StreamTaskTest.java | 1 - 2 files changed, 9 deletions(-) diff --git a/streams/src/test/java/org/apache/kafka/streams/processor/internals/StateManagerUtilTest.java b/streams/src/test/java/org/apache/kafka/streams/processor/internals/StateManagerUtilTest.java index a9f831b00be14..aa6bff961953f 100644 --- a/streams/src/test/java/org/apache/kafka/streams/processor/internals/StateManagerUtilTest.java +++ b/streams/src/test/java/org/apache/kafka/streams/processor/internals/StateManagerUtilTest.java @@ -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; @@ -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(); @@ -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(); @@ -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")); @@ -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")); @@ -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(); @@ -306,7 +299,6 @@ public void testCloseStateManagerWithStateStoreWipeOutRethrowWrappedIOException( mockStatic(Utils.class); expect(stateManager.taskId()).andReturn(taskId); - expect(stateManager.changelogPartitions()).andReturn(Collections.emptySet()); stateManager.close(); expectLastCall(); diff --git a/streams/src/test/java/org/apache/kafka/streams/processor/internals/StreamTaskTest.java b/streams/src/test/java/org/apache/kafka/streams/processor/internals/StreamTaskTest.java index 032e1375341a2..26c9b087896a4 100644 --- a/streams/src/test/java/org/apache/kafka/streams/processor/internals/StreamTaskTest.java +++ b/streams/src/test/java/org/apache/kafka/streams/processor/internals/StreamTaskTest.java @@ -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();