flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tzulitai <...@git.apache.org>
Subject [GitHub] flink pull request #4344: (release-1.3) [FLINK-7195] [kafka] Remove partitio...
Date Tue, 18 Jul 2017 10:13:57 GMT
Github user tzulitai commented on a diff in the pull request:

    https://github.com/apache/flink/pull/4344#discussion_r127935505
  
    --- Diff: flink-connectors/flink-connector-kafka-base/src/test/java/org/apache/flink/streaming/connectors/kafka/FlinkKafkaConsumerBaseTest.java
---
    @@ -532,6 +533,107 @@ public void testSnapshotStateWithCommitOnCheckpointsDisabled() throws
Exception
     		verify(fetcher, never()).commitInternalOffsetsToKafka(anyMap()); // not offsets should
be committed
     	}
     
    +	@Test
    +	public void testRestoredStateInsensitiveToMissingPartitions() throws Exception {
    +		List<KafkaTopicPartition> mockFetchedPartitionsOnStartup = Arrays.asList(
    +			new KafkaTopicPartition("test-topic", 0),
    +			new KafkaTopicPartition("test-topic", 1),
    +			new KafkaTopicPartition("test-topic", 2));
    +
    +		// missing fetched partitions on restore
    +		List<KafkaTopicPartition> mockFetchedPartitionsOnRestore = mockFetchedPartitionsOnStartup.subList(0,
2);
    +
    +		testRestoredStateInsensitiveToFetchedPartitions(mockFetchedPartitionsOnStartup, mockFetchedPartitionsOnRestore);
    +	}
    +
    +	@Test
    +	public void testRestoredStateInsensitiveToNewPartitions() throws Exception {
    +		List<KafkaTopicPartition> mockFetchedPartitionsOnStartup = Arrays.asList(
    +			new KafkaTopicPartition("test-topic", 0),
    +			new KafkaTopicPartition("test-topic", 1),
    +			new KafkaTopicPartition("test-topic", 2));
    +
    +		// new partitions on restore
    +		List<KafkaTopicPartition> mockFetchedPartitionsOnRestore = new ArrayList<>(mockFetchedPartitionsOnStartup);
    --- End diff --
    
    will change 👌 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message