flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pnowojski <...@git.apache.org>
Subject [GitHub] flink pull request #5200: [FLINK-8306] [kafka] Introduce KafkaOffsetCommitte...
Date Mon, 08 Jan 2018 10:57:26 GMT
Github user pnowojski commented on a diff in the pull request:

    https://github.com/apache/flink/pull/5200#discussion_r160107329
  
    --- Diff: flink-connectors/flink-connector-kafka-base/src/test/java/org/apache/flink/streaming/connectors/kafka/FlinkKafkaConsumerBaseTest.java
---
    @@ -89,30 +90,44 @@
     	@SuppressWarnings("unchecked")
     	public void testEitherWatermarkExtractor() {
     		try {
    -			new DummyFlinkKafkaConsumer<String>(mock(AbstractFetcher.class), mock(AbstractPartitionDiscoverer.class),
false)
    +			new DummyFlinkKafkaConsumer<String>(
    +					mock(AbstractFetcher.class),
    +					mock(AbstractPartitionDiscoverer.class),
    +					mock(KafkaOffsetCommitter.class),
    +					false)
     				.assignTimestampsAndWatermarks((AssignerWithPeriodicWatermarks<String>) null);
     			fail();
     		} catch (NullPointerException ignored) {}
     
     		try {
    -			new DummyFlinkKafkaConsumer<String>(mock(AbstractFetcher.class), mock(AbstractPartitionDiscoverer.class),
false)
    +			new DummyFlinkKafkaConsumer<String>(
    +					mock(AbstractFetcher.class),
    +					mock(AbstractPartitionDiscoverer.class),
    +					mock(KafkaOffsetCommitter.class),
    +					false)
     				.assignTimestampsAndWatermarks((AssignerWithPunctuatedWatermarks<String>) null);
     			fail();
     		} catch (NullPointerException ignored) {}
     
     		final AssignerWithPeriodicWatermarks<String> periodicAssigner = mock(AssignerWithPeriodicWatermarks.class);
     		final AssignerWithPunctuatedWatermarks<String> punctuatedAssigner = mock(AssignerWithPunctuatedWatermarks.class);
     
    -		DummyFlinkKafkaConsumer<String> c1 =
    -			new DummyFlinkKafkaConsumer<>(mock(AbstractFetcher.class), mock(AbstractPartitionDiscoverer.class),
false);
    +		DummyFlinkKafkaConsumer<String> c1 = new DummyFlinkKafkaConsumer<>(
    +				mock(AbstractFetcher.class),
    +				mock(AbstractPartitionDiscoverer.class),
    +				mock(KafkaOffsetCommitter.class),
    --- End diff --
    
    Please replace everywhere `mock(KafkaOffsetCommitter.class)` with `new DummyKafkaOffsetCommitter()`
or `new NoOpKafkaOffsetCommitter()`.
      


---

Mime
View raw message