Github user pnowojski commented on a diff in the pull request:
https://github.com/apache/flink/pull/5284#discussion_r161176765
--- Diff:
flink-connectors/flink-connector-kafka-base/src/test/java/org/apache/flink/streaming/connectors/kafka/FlinkKafkaConsumerBaseTest.java
---
@@ -265,10 +274,8 @@ public void
testSnapshotStateWithCommitOnCheckpointsEnabled() throws Exception {
//
--------------------------------------------------------------------
- final OneShotLatch runLatch = new OneShotLatch();
- final OneShotLatch stopLatch = new OneShotLatch();
- final AbstractFetcher<String, ?> fetcher =
getRunnableMockFetcher(runLatch, stopLatch);
- when(fetcher.snapshotCurrentState()).thenReturn(state1, state2,
state3);
+ final MockFetcher<String> fetcher = spy(new MockFetcher<>());
+
doReturn(state1).doReturn(state2).doReturn(state3).when(fetcher).snapshotCurrentState();
--- End diff --
Ops, haven't noticed that :)
---