Github user zentol commented on a diff in the pull request:
https://github.com/apache/flink/pull/2797#discussion_r88206960
--- Diff:
flink-streaming-connectors/flink-connector-filesystem/src/test/java/org/apache/flink/streaming/connectors/fs/bucketing/BucketingSinkFaultToleranceITCase.java
---
@@ -160,7 +167,15 @@ public void postSubmit() throws Exception {
while (line != null) {
Matcher matcher =
messageRegex.matcher(line);
if (matcher.matches()) {
- numRead++;
+ uniqMessagesRead.add(line);
+
+ // check that in the committed
files there are no duplicates
+ if
(!file.getPath().toString().endsWith(IN_PROGRESS_SUFFIX) &&
!file.getPath().toString().endsWith(PENDING_SUFFIX)) {
+ if
(!messagesInCommittedFiles.add(line)) {
+
Assert.fail("Duplicate entry in committed bucket.");
--- End diff --
this check isn't truly necessary, is it? We have the total number of
messages with `readNumbers.size()`, and the number of unique messages ones in
`uniqMessagesRead.size()`. Since we compare both with `NUM_STRINGS` the test
can only succeed if no duplicates exist anyway.
---
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 [email protected] or file a JIRA ticket
with INFRA.
---