You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2021/07/07 16:14:41 UTC

[GitHub] [flink] rkhachatryan opened a new pull request #16415: [FLINK-23262][tests] Check watermark frequency instead of count

rkhachatryan opened a new pull request #16415:
URL: https://github.com/apache/flink/pull/16415


   ## What is the purpose of the change
   
   Reintroduce checking watermark frequency instead of count
   after recent improvements invalidated count assumption.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #16415: [FLINK-23262][tests] Check watermark frequency instead of count

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #16415:
URL: https://github.com/apache/flink/pull/16415#issuecomment-875773502


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "4d9f0a3483b7360f064c318f8ebbc53eaeb88e59",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=20113",
       "triggerID" : "4d9f0a3483b7360f064c318f8ebbc53eaeb88e59",
       "triggerType" : "PUSH"
     }, {
       "hash" : "251329bfc74f78dc4f0da29b76d10f1f952c9964",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=20125",
       "triggerID" : "251329bfc74f78dc4f0da29b76d10f1f952c9964",
       "triggerType" : "PUSH"
     }, {
       "hash" : "c4932fed849d9c0263f74f40d42c764255a4a165",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=20174",
       "triggerID" : "c4932fed849d9c0263f74f40d42c764255a4a165",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 251329bfc74f78dc4f0da29b76d10f1f952c9964 Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=20125) 
   * c4932fed849d9c0263f74f40d42c764255a4a165 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=20174) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] dawidwys commented on pull request #16415: [FLINK-23262][tests] Check watermark frequency instead of count

Posted by GitBox <gi...@apache.org>.
dawidwys commented on pull request #16415:
URL: https://github.com/apache/flink/pull/16415#issuecomment-876182906


   Which improvements do you refer to?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #16415: [FLINK-23262][tests] Check watermark frequency instead of count

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #16415:
URL: https://github.com/apache/flink/pull/16415#issuecomment-875773502


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "4d9f0a3483b7360f064c318f8ebbc53eaeb88e59",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=20113",
       "triggerID" : "4d9f0a3483b7360f064c318f8ebbc53eaeb88e59",
       "triggerType" : "PUSH"
     }, {
       "hash" : "251329bfc74f78dc4f0da29b76d10f1f952c9964",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=20125",
       "triggerID" : "251329bfc74f78dc4f0da29b76d10f1f952c9964",
       "triggerType" : "PUSH"
     }, {
       "hash" : "c4932fed849d9c0263f74f40d42c764255a4a165",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=20174",
       "triggerID" : "c4932fed849d9c0263f74f40d42c764255a4a165",
       "triggerType" : "PUSH"
     }, {
       "hash" : "f6787fb53d8d368feed7c2f44a3091c016f90378",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "f6787fb53d8d368feed7c2f44a3091c016f90378",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 251329bfc74f78dc4f0da29b76d10f1f952c9964 Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=20125) 
   * c4932fed849d9c0263f74f40d42c764255a4a165 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=20174) 
   * f6787fb53d8d368feed7c2f44a3091c016f90378 UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] rkhachatryan commented on pull request #16415: [FLINK-23262][tests] Check watermark frequency instead of count

Posted by GitBox <gi...@apache.org>.
rkhachatryan commented on pull request #16415:
URL: https://github.com/apache/flink/pull/16415#issuecomment-877005296


   Thanks for reviewing and merging @dawidwys 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] rkhachatryan commented on a change in pull request #16415: [FLINK-23262][tests] Check watermark frequency instead of count

Posted by GitBox <gi...@apache.org>.
rkhachatryan commented on a change in pull request #16415:
URL: https://github.com/apache/flink/pull/16415#discussion_r666132316



##########
File path: flink-tests/src/test/java/org/apache/flink/test/streaming/api/FileReadingWatermarkITCase.java
##########
@@ -62,8 +64,17 @@ public void testWatermarkEmissionWithChaining() throws Exception {
         JobExecutionResult result = env.execute();
 
         int actual = result.getAccumulatorResult(NUM_WATERMARKS_ACC_NAME);
-
-        assertTrue("too few watermarks emitted: " + actual, actual >= MIN_EXPECTED_WATERMARKS);
+        long expected =
+                result.<Long>getAccumulatorResult(RUNTIME_ACC_NAME) / WATERMARK_INTERVAL_MILLIS;
+        checkState(expected > MIN_EXPECTED_WATERMARKS);
+
+        assertEquals(
+                "too few watermarks emitted in "
+                        + result.<Long>getAccumulatorResult(RUNTIME_ACC_NAME)
+                        + " ms",
+                expected,
+                actual,
+                .5 * expected);

Review comment:
       I totally agree, it's undeterministic.
   The values are empirical as there are no hard guarantees, e.g. with 5M lines watermark interval becomes stable.
   1h comes from the originally reported case IIRC.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #16415: [FLINK-23262][tests] Check watermark frequency instead of count

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #16415:
URL: https://github.com/apache/flink/pull/16415#issuecomment-875740234


   Thanks a lot for your contribution to the Apache Flink project. I'm the @flinkbot. I help the community
   to review your pull request. We will use this comment to track the progress of the review.
   
   
   ## Automated Checks
   Last check on commit 499dfac89e8c2411c75e14c407e46a1195a4ac60 (Thu Sep 23 18:00:26 UTC 2021)
   
   **Warnings:**
    * No documentation files were touched! Remember to keep the Flink docs up to date!
   
   
   <sub>Mention the bot in a comment to re-run the automated checks.</sub>
   ## Review Progress
   
   * ❓ 1. The [description] looks good.
   * ❓ 2. There is [consensus] that the contribution should go into to Flink.
   * ❓ 3. Needs [attention] from.
   * ❓ 4. The change fits into the overall [architecture].
   * ❓ 5. Overall code [quality] is good.
   
   Please see the [Pull Request Review Guide](https://flink.apache.org/contributing/reviewing-prs.html) for a full explanation of the review process.<details>
    The Bot is tracking the review progress through labels. Labels are applied according to the order of the review items. For consensus, approval by a Flink committer of PMC member is required <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot approve description` to approve one or more aspects (aspects: `description`, `consensus`, `architecture` and `quality`)
    - `@flinkbot approve all` to approve all aspects
    - `@flinkbot approve-until architecture` to approve everything until `architecture`
    - `@flinkbot attention @username1 [@username2 ..]` to require somebody's attention
    - `@flinkbot disapprove architecture` to remove an approval you gave earlier
   </details>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #16415: [FLINK-23262][tests] Check watermark frequency instead of count

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #16415:
URL: https://github.com/apache/flink/pull/16415#issuecomment-875773502


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "4d9f0a3483b7360f064c318f8ebbc53eaeb88e59",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=20113",
       "triggerID" : "4d9f0a3483b7360f064c318f8ebbc53eaeb88e59",
       "triggerType" : "PUSH"
     }, {
       "hash" : "251329bfc74f78dc4f0da29b76d10f1f952c9964",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=20125",
       "triggerID" : "251329bfc74f78dc4f0da29b76d10f1f952c9964",
       "triggerType" : "PUSH"
     }, {
       "hash" : "c4932fed849d9c0263f74f40d42c764255a4a165",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=20174",
       "triggerID" : "c4932fed849d9c0263f74f40d42c764255a4a165",
       "triggerType" : "PUSH"
     }, {
       "hash" : "f6787fb53d8d368feed7c2f44a3091c016f90378",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=20181",
       "triggerID" : "f6787fb53d8d368feed7c2f44a3091c016f90378",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 251329bfc74f78dc4f0da29b76d10f1f952c9964 Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=20125) 
   * c4932fed849d9c0263f74f40d42c764255a4a165 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=20174) 
   * f6787fb53d8d368feed7c2f44a3091c016f90378 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=20181) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] dawidwys commented on pull request #16415: [FLINK-23262][tests] Check watermark frequency instead of count

Posted by GitBox <gi...@apache.org>.
dawidwys commented on pull request #16415:
URL: https://github.com/apache/flink/pull/16415#issuecomment-876635722


   I am afraid it does not help :( It failed on azure for this PR.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #16415: [FLINK-23262][tests] Check watermark frequency instead of count

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #16415:
URL: https://github.com/apache/flink/pull/16415#issuecomment-875773502


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "4d9f0a3483b7360f064c318f8ebbc53eaeb88e59",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=20113",
       "triggerID" : "4d9f0a3483b7360f064c318f8ebbc53eaeb88e59",
       "triggerType" : "PUSH"
     }, {
       "hash" : "251329bfc74f78dc4f0da29b76d10f1f952c9964",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=20125",
       "triggerID" : "251329bfc74f78dc4f0da29b76d10f1f952c9964",
       "triggerType" : "PUSH"
     }, {
       "hash" : "c4932fed849d9c0263f74f40d42c764255a4a165",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=20174",
       "triggerID" : "c4932fed849d9c0263f74f40d42c764255a4a165",
       "triggerType" : "PUSH"
     }, {
       "hash" : "f6787fb53d8d368feed7c2f44a3091c016f90378",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=20181",
       "triggerID" : "f6787fb53d8d368feed7c2f44a3091c016f90378",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * f6787fb53d8d368feed7c2f44a3091c016f90378 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=20181) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #16415: [FLINK-23262][tests] Check watermark frequency instead of count

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #16415:
URL: https://github.com/apache/flink/pull/16415#issuecomment-875773502


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "4d9f0a3483b7360f064c318f8ebbc53eaeb88e59",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=20113",
       "triggerID" : "4d9f0a3483b7360f064c318f8ebbc53eaeb88e59",
       "triggerType" : "PUSH"
     }, {
       "hash" : "251329bfc74f78dc4f0da29b76d10f1f952c9964",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "251329bfc74f78dc4f0da29b76d10f1f952c9964",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 4d9f0a3483b7360f064c318f8ebbc53eaeb88e59 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=20113) 
   * 251329bfc74f78dc4f0da29b76d10f1f952c9964 UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] rkhachatryan commented on pull request #16415: [FLINK-23262][tests] Check watermark frequency instead of count

Posted by GitBox <gi...@apache.org>.
rkhachatryan commented on pull request #16415:
URL: https://github.com/apache/flink/pull/16415#issuecomment-876192164


   Your changes in the MailboxProcessor, @dawidwys :slightly_smiling_face: 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #16415: [FLINK-23262][tests] Check watermark frequency instead of count

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #16415:
URL: https://github.com/apache/flink/pull/16415#issuecomment-875773502


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "4d9f0a3483b7360f064c318f8ebbc53eaeb88e59",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=20113",
       "triggerID" : "4d9f0a3483b7360f064c318f8ebbc53eaeb88e59",
       "triggerType" : "PUSH"
     }, {
       "hash" : "251329bfc74f78dc4f0da29b76d10f1f952c9964",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=20125",
       "triggerID" : "251329bfc74f78dc4f0da29b76d10f1f952c9964",
       "triggerType" : "PUSH"
     }, {
       "hash" : "c4932fed849d9c0263f74f40d42c764255a4a165",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=20174",
       "triggerID" : "c4932fed849d9c0263f74f40d42c764255a4a165",
       "triggerType" : "PUSH"
     }, {
       "hash" : "f6787fb53d8d368feed7c2f44a3091c016f90378",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=20181",
       "triggerID" : "f6787fb53d8d368feed7c2f44a3091c016f90378",
       "triggerType" : "PUSH"
     }, {
       "hash" : "499dfac89e8c2411c75e14c407e46a1195a4ac60",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=20198",
       "triggerID" : "499dfac89e8c2411c75e14c407e46a1195a4ac60",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * f6787fb53d8d368feed7c2f44a3091c016f90378 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=20181) 
   * 499dfac89e8c2411c75e14c407e46a1195a4ac60 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=20198) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] dawidwys commented on a change in pull request #16415: [FLINK-23262][tests] Check watermark frequency instead of count

Posted by GitBox <gi...@apache.org>.
dawidwys commented on a change in pull request #16415:
URL: https://github.com/apache/flink/pull/16415#discussion_r666054922



##########
File path: flink-tests/src/test/java/org/apache/flink/test/streaming/api/FileReadingWatermarkITCase.java
##########
@@ -62,8 +64,17 @@ public void testWatermarkEmissionWithChaining() throws Exception {
         JobExecutionResult result = env.execute();
 
         int actual = result.getAccumulatorResult(NUM_WATERMARKS_ACC_NAME);
-
-        assertTrue("too few watermarks emitted: " + actual, actual >= MIN_EXPECTED_WATERMARKS);
+        long expected =

Review comment:
       This computation seems a bit off for me. The `RUNTIME_ACC_NAME` is taken long after there can be watermarks generated.
   
   `close` is called to release resources, one we closed the mailbox, all timers waited for pending checkpoints etc. All those actions might take some time, but that should not add to the expected number of watermarks.

##########
File path: flink-tests/src/test/java/org/apache/flink/test/streaming/api/FileReadingWatermarkITCase.java
##########
@@ -62,8 +64,17 @@ public void testWatermarkEmissionWithChaining() throws Exception {
         JobExecutionResult result = env.execute();
 
         int actual = result.getAccumulatorResult(NUM_WATERMARKS_ACC_NAME);
-
-        assertTrue("too few watermarks emitted: " + actual, actual >= MIN_EXPECTED_WATERMARKS);
+        long expected =
+                result.<Long>getAccumulatorResult(RUNTIME_ACC_NAME) / WATERMARK_INTERVAL_MILLIS;
+        checkState(expected > MIN_EXPECTED_WATERMARKS);
+
+        assertEquals(
+                "too few watermarks emitted in "
+                        + result.<Long>getAccumulatorResult(RUNTIME_ACC_NAME)
+                        + " ms",
+                expected,
+                actual,
+                .5 * expected);

Review comment:
       Where does the delta come from? Isn't it too big? Does it mean that the number of checkpoints can be just half of the `expected` number?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] rkhachatryan commented on a change in pull request #16415: [FLINK-23262][tests] Check watermark frequency instead of count

Posted by GitBox <gi...@apache.org>.
rkhachatryan commented on a change in pull request #16415:
URL: https://github.com/apache/flink/pull/16415#discussion_r666081342



##########
File path: flink-tests/src/test/java/org/apache/flink/test/streaming/api/FileReadingWatermarkITCase.java
##########
@@ -62,8 +64,17 @@ public void testWatermarkEmissionWithChaining() throws Exception {
         JobExecutionResult result = env.execute();
 
         int actual = result.getAccumulatorResult(NUM_WATERMARKS_ACC_NAME);
-
-        assertTrue("too few watermarks emitted: " + actual, actual >= MIN_EXPECTED_WATERMARKS);
+        long expected =
+                result.<Long>getAccumulatorResult(RUNTIME_ACC_NAME) / WATERMARK_INTERVAL_MILLIS;
+        checkState(expected > MIN_EXPECTED_WATERMARKS);
+
+        assertEquals(
+                "too few watermarks emitted in "
+                        + result.<Long>getAccumulatorResult(RUNTIME_ACC_NAME)
+                        + " ms",
+                expected,
+                actual,
+                .5 * expected);

Review comment:
       Would be happy to learn how to test it better :)
   
   Yes, I think single watermark will make it useless.
   
   The comment is referring to the original issue, I'm not sure if it's still relevant.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] dawidwys commented on a change in pull request #16415: [FLINK-23262][tests] Check watermark frequency instead of count

Posted by GitBox <gi...@apache.org>.
dawidwys commented on a change in pull request #16415:
URL: https://github.com/apache/flink/pull/16415#discussion_r666084745



##########
File path: flink-tests/src/test/java/org/apache/flink/test/streaming/api/FileReadingWatermarkITCase.java
##########
@@ -62,8 +64,17 @@ public void testWatermarkEmissionWithChaining() throws Exception {
         JobExecutionResult result = env.execute();
 
         int actual = result.getAccumulatorResult(NUM_WATERMARKS_ACC_NAME);
-
-        assertTrue("too few watermarks emitted: " + actual, actual >= MIN_EXPECTED_WATERMARKS);
+        long expected =
+                result.<Long>getAccumulatorResult(RUNTIME_ACC_NAME) / WATERMARK_INTERVAL_MILLIS;
+        checkState(expected > MIN_EXPECTED_WATERMARKS);
+
+        assertEquals(
+                "too few watermarks emitted in "
+                        + result.<Long>getAccumulatorResult(RUNTIME_ACC_NAME)
+                        + " ms",
+                expected,
+                actual,
+                .5 * expected);

Review comment:
       Just to be clear, I am not criticizing the work here. Just wanted to say it is quite a bit undeterministic.
   
   Unfortunately I don't get the full purpose and corner cases it tries to test. I also don't understand where do the minimum 5 expected watermarks come from. Also don't know why we use 1 hour for bounded out of order watermarks, what's the criteria for the number of lines etc. 
   
   I'll trust your judgement though. The changes definitely do not make it worse and if you say it will improve the stability let's go with them.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot commented on pull request #16415: [FLINK-23262][tests] Check watermark frequency instead of count

Posted by GitBox <gi...@apache.org>.
flinkbot commented on pull request #16415:
URL: https://github.com/apache/flink/pull/16415#issuecomment-875773502


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "4d9f0a3483b7360f064c318f8ebbc53eaeb88e59",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "4d9f0a3483b7360f064c318f8ebbc53eaeb88e59",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 4d9f0a3483b7360f064c318f8ebbc53eaeb88e59 UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] rkhachatryan commented on pull request #16415: [FLINK-23262][tests] Check watermark frequency instead of count

Posted by GitBox <gi...@apache.org>.
rkhachatryan commented on pull request #16415:
URL: https://github.com/apache/flink/pull/16415#issuecomment-876898158


   Sorry, my bad, I should have apply the same change to record the start time.
   Now the test passed (also checked locally with 10k runs).


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] rkhachatryan commented on a change in pull request #16415: [FLINK-23262][tests] Check watermark frequency instead of count

Posted by GitBox <gi...@apache.org>.
rkhachatryan commented on a change in pull request #16415:
URL: https://github.com/apache/flink/pull/16415#discussion_r666072744



##########
File path: flink-tests/src/test/java/org/apache/flink/test/streaming/api/FileReadingWatermarkITCase.java
##########
@@ -62,8 +64,17 @@ public void testWatermarkEmissionWithChaining() throws Exception {
         JobExecutionResult result = env.execute();
 
         int actual = result.getAccumulatorResult(NUM_WATERMARKS_ACC_NAME);
-
-        assertTrue("too few watermarks emitted: " + actual, actual >= MIN_EXPECTED_WATERMARKS);
+        long expected =

Review comment:
       Good point.
   I'll change it to update the accumulator for the running time when processing the last record in sink.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #16415: [FLINK-23262][tests] Check watermark frequency instead of count

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #16415:
URL: https://github.com/apache/flink/pull/16415#issuecomment-875773502


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "4d9f0a3483b7360f064c318f8ebbc53eaeb88e59",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=20113",
       "triggerID" : "4d9f0a3483b7360f064c318f8ebbc53eaeb88e59",
       "triggerType" : "PUSH"
     }, {
       "hash" : "251329bfc74f78dc4f0da29b76d10f1f952c9964",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=20125",
       "triggerID" : "251329bfc74f78dc4f0da29b76d10f1f952c9964",
       "triggerType" : "PUSH"
     }, {
       "hash" : "c4932fed849d9c0263f74f40d42c764255a4a165",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "c4932fed849d9c0263f74f40d42c764255a4a165",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 251329bfc74f78dc4f0da29b76d10f1f952c9964 Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=20125) 
   * c4932fed849d9c0263f74f40d42c764255a4a165 UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] rkhachatryan commented on a change in pull request #16415: [FLINK-23262][tests] Check watermark frequency instead of count

Posted by GitBox <gi...@apache.org>.
rkhachatryan commented on a change in pull request #16415:
URL: https://github.com/apache/flink/pull/16415#discussion_r666066907



##########
File path: flink-tests/src/test/java/org/apache/flink/test/streaming/api/FileReadingWatermarkITCase.java
##########
@@ -62,8 +64,17 @@ public void testWatermarkEmissionWithChaining() throws Exception {
         JobExecutionResult result = env.execute();
 
         int actual = result.getAccumulatorResult(NUM_WATERMARKS_ACC_NAME);
-
-        assertTrue("too few watermarks emitted: " + actual, actual >= MIN_EXPECTED_WATERMARKS);
+        long expected =
+                result.<Long>getAccumulatorResult(RUNTIME_ACC_NAME) / WATERMARK_INTERVAL_MILLIS;
+        checkState(expected > MIN_EXPECTED_WATERMARKS);
+
+        assertEquals(
+                "too few watermarks emitted in "
+                        + result.<Long>getAccumulatorResult(RUNTIME_ACC_NAME)
+                        + " ms",
+                expected,
+                actual,
+                .5 * expected);

Review comment:
       > Does it mean that the number of checkpoints can be just half of the expected number?
   
   You mean watermarks, not checkpoints, right?
   
   The value is just an empirical number because there are no guarantees regarding the watermark interval (or am I wrong?)
   I'm afraid decreasing it would make the test more flaky (it does fail with `.2` sometimes and rarely with `.3`).




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] dawidwys commented on pull request #16415: [FLINK-23262][tests] Check watermark frequency instead of count

Posted by GitBox <gi...@apache.org>.
dawidwys commented on pull request #16415:
URL: https://github.com/apache/flink/pull/16415#issuecomment-876985840


   I'll merge it, as the test became really unstable in the past days.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #16415: [FLINK-23262][tests] Check watermark frequency instead of count

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #16415:
URL: https://github.com/apache/flink/pull/16415#issuecomment-875773502


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "4d9f0a3483b7360f064c318f8ebbc53eaeb88e59",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=20113",
       "triggerID" : "4d9f0a3483b7360f064c318f8ebbc53eaeb88e59",
       "triggerType" : "PUSH"
     }, {
       "hash" : "251329bfc74f78dc4f0da29b76d10f1f952c9964",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=20125",
       "triggerID" : "251329bfc74f78dc4f0da29b76d10f1f952c9964",
       "triggerType" : "PUSH"
     }, {
       "hash" : "c4932fed849d9c0263f74f40d42c764255a4a165",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=20174",
       "triggerID" : "c4932fed849d9c0263f74f40d42c764255a4a165",
       "triggerType" : "PUSH"
     }, {
       "hash" : "f6787fb53d8d368feed7c2f44a3091c016f90378",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=20181",
       "triggerID" : "f6787fb53d8d368feed7c2f44a3091c016f90378",
       "triggerType" : "PUSH"
     }, {
       "hash" : "499dfac89e8c2411c75e14c407e46a1195a4ac60",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "499dfac89e8c2411c75e14c407e46a1195a4ac60",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * f6787fb53d8d368feed7c2f44a3091c016f90378 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=20181) 
   * 499dfac89e8c2411c75e14c407e46a1195a4ac60 UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] dawidwys closed pull request #16415: [FLINK-23262][tests] Check watermark frequency instead of count

Posted by GitBox <gi...@apache.org>.
dawidwys closed pull request #16415:
URL: https://github.com/apache/flink/pull/16415


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot commented on pull request #16415: [FLINK-23262][tests] Check watermark frequency instead of count

Posted by GitBox <gi...@apache.org>.
flinkbot commented on pull request #16415:
URL: https://github.com/apache/flink/pull/16415#issuecomment-875740234


   Thanks a lot for your contribution to the Apache Flink project. I'm the @flinkbot. I help the community
   to review your pull request. We will use this comment to track the progress of the review.
   
   
   ## Automated Checks
   Last check on commit 4d9f0a3483b7360f064c318f8ebbc53eaeb88e59 (Wed Jul 07 16:17:20 UTC 2021)
   
   **Warnings:**
    * No documentation files were touched! Remember to keep the Flink docs up to date!
   
   
   <sub>Mention the bot in a comment to re-run the automated checks.</sub>
   ## Review Progress
   
   * ❓ 1. The [description] looks good.
   * ❓ 2. There is [consensus] that the contribution should go into to Flink.
   * ❓ 3. Needs [attention] from.
   * ❓ 4. The change fits into the overall [architecture].
   * ❓ 5. Overall code [quality] is good.
   
   Please see the [Pull Request Review Guide](https://flink.apache.org/contributing/reviewing-prs.html) for a full explanation of the review process.<details>
    The Bot is tracking the review progress through labels. Labels are applied according to the order of the review items. For consensus, approval by a Flink committer of PMC member is required <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot approve description` to approve one or more aspects (aspects: `description`, `consensus`, `architecture` and `quality`)
    - `@flinkbot approve all` to approve all aspects
    - `@flinkbot approve-until architecture` to approve everything until `architecture`
    - `@flinkbot attention @username1 [@username2 ..]` to require somebody's attention
    - `@flinkbot disapprove architecture` to remove an approval you gave earlier
   </details>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #16415: [FLINK-23262][tests] Check watermark frequency instead of count

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #16415:
URL: https://github.com/apache/flink/pull/16415#issuecomment-875773502


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "4d9f0a3483b7360f064c318f8ebbc53eaeb88e59",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=20113",
       "triggerID" : "4d9f0a3483b7360f064c318f8ebbc53eaeb88e59",
       "triggerType" : "PUSH"
     }, {
       "hash" : "251329bfc74f78dc4f0da29b76d10f1f952c9964",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=20125",
       "triggerID" : "251329bfc74f78dc4f0da29b76d10f1f952c9964",
       "triggerType" : "PUSH"
     }, {
       "hash" : "c4932fed849d9c0263f74f40d42c764255a4a165",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=20174",
       "triggerID" : "c4932fed849d9c0263f74f40d42c764255a4a165",
       "triggerType" : "PUSH"
     }, {
       "hash" : "f6787fb53d8d368feed7c2f44a3091c016f90378",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=20181",
       "triggerID" : "f6787fb53d8d368feed7c2f44a3091c016f90378",
       "triggerType" : "PUSH"
     }, {
       "hash" : "499dfac89e8c2411c75e14c407e46a1195a4ac60",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=20198",
       "triggerID" : "499dfac89e8c2411c75e14c407e46a1195a4ac60",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 499dfac89e8c2411c75e14c407e46a1195a4ac60 Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=20198) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #16415: [FLINK-23262][tests] Check watermark frequency instead of count

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #16415:
URL: https://github.com/apache/flink/pull/16415#issuecomment-875773502


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "4d9f0a3483b7360f064c318f8ebbc53eaeb88e59",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=20113",
       "triggerID" : "4d9f0a3483b7360f064c318f8ebbc53eaeb88e59",
       "triggerType" : "PUSH"
     }, {
       "hash" : "251329bfc74f78dc4f0da29b76d10f1f952c9964",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=20125",
       "triggerID" : "251329bfc74f78dc4f0da29b76d10f1f952c9964",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 4d9f0a3483b7360f064c318f8ebbc53eaeb88e59 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=20113) 
   * 251329bfc74f78dc4f0da29b76d10f1f952c9964 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=20125) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #16415: [FLINK-23262][tests] Check watermark frequency instead of count

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #16415:
URL: https://github.com/apache/flink/pull/16415#issuecomment-875773502


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "4d9f0a3483b7360f064c318f8ebbc53eaeb88e59",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=20113",
       "triggerID" : "4d9f0a3483b7360f064c318f8ebbc53eaeb88e59",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 4d9f0a3483b7360f064c318f8ebbc53eaeb88e59 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=20113) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] rkhachatryan edited a comment on pull request #16415: [FLINK-23262][tests] Check watermark frequency instead of count

Posted by GitBox <gi...@apache.org>.
rkhachatryan edited a comment on pull request #16415:
URL: https://github.com/apache/flink/pull/16415#issuecomment-876898158


   Sorry, my bad, I should have apply the same change to record the start time.
   Now (with 499dfac) the test passed (also checked locally with 10k runs).


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #16415: [FLINK-23262][tests] Check watermark frequency instead of count

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #16415:
URL: https://github.com/apache/flink/pull/16415#issuecomment-875773502


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "4d9f0a3483b7360f064c318f8ebbc53eaeb88e59",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=20113",
       "triggerID" : "4d9f0a3483b7360f064c318f8ebbc53eaeb88e59",
       "triggerType" : "PUSH"
     }, {
       "hash" : "251329bfc74f78dc4f0da29b76d10f1f952c9964",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=20125",
       "triggerID" : "251329bfc74f78dc4f0da29b76d10f1f952c9964",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 251329bfc74f78dc4f0da29b76d10f1f952c9964 Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=20125) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] rkhachatryan edited a comment on pull request #16415: [FLINK-23262][tests] Check watermark frequency instead of count

Posted by GitBox <gi...@apache.org>.
rkhachatryan edited a comment on pull request #16415:
URL: https://github.com/apache/flink/pull/16415#issuecomment-876898158


   Sorry, my bad, I should have apply the same change to record the start time.
   Now (with 499dfac) the test passed (also checked locally with 10k runs, with smaller `FILE_SIZE_LINES = 1_000_000`).


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] dawidwys commented on a change in pull request #16415: [FLINK-23262][tests] Check watermark frequency instead of count

Posted by GitBox <gi...@apache.org>.
dawidwys commented on a change in pull request #16415:
URL: https://github.com/apache/flink/pull/16415#discussion_r666074595



##########
File path: flink-tests/src/test/java/org/apache/flink/test/streaming/api/FileReadingWatermarkITCase.java
##########
@@ -62,8 +64,17 @@ public void testWatermarkEmissionWithChaining() throws Exception {
         JobExecutionResult result = env.execute();
 
         int actual = result.getAccumulatorResult(NUM_WATERMARKS_ACC_NAME);
-
-        assertTrue("too few watermarks emitted: " + actual, actual >= MIN_EXPECTED_WATERMARKS);
+        long expected =
+                result.<Long>getAccumulatorResult(RUNTIME_ACC_NAME) / WATERMARK_INTERVAL_MILLIS;
+        checkState(expected > MIN_EXPECTED_WATERMARKS);
+
+        assertEquals(
+                "too few watermarks emitted in "
+                        + result.<Long>getAccumulatorResult(RUNTIME_ACC_NAME)
+                        + " ms",
+                expected,
+                actual,
+                .5 * expected);

Review comment:
       Yeah, that's the sentiment that I am getting from the test. We just hope it works. ;)
   
   Would simplifying the test to check if there was at least a single watermark made the test useless? Or would it basically check the same thing? I also don't get the comment on the class:
   
   >  * Tests that watermarks are emitted while file is being read, particularly the last split.
   
   How does it test emitting watermarks from the last split?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] dawidwys commented on a change in pull request #16415: [FLINK-23262][tests] Check watermark frequency instead of count

Posted by GitBox <gi...@apache.org>.
dawidwys commented on a change in pull request #16415:
URL: https://github.com/apache/flink/pull/16415#discussion_r666071573



##########
File path: flink-tests/src/test/java/org/apache/flink/test/streaming/api/FileReadingWatermarkITCase.java
##########
@@ -62,8 +64,17 @@ public void testWatermarkEmissionWithChaining() throws Exception {
         JobExecutionResult result = env.execute();
 
         int actual = result.getAccumulatorResult(NUM_WATERMARKS_ACC_NAME);
-
-        assertTrue("too few watermarks emitted: " + actual, actual >= MIN_EXPECTED_WATERMARKS);
+        long expected =
+                result.<Long>getAccumulatorResult(RUNTIME_ACC_NAME) / WATERMARK_INTERVAL_MILLIS;
+        checkState(expected > MIN_EXPECTED_WATERMARKS);
+
+        assertEquals(
+                "too few watermarks emitted in "
+                        + result.<Long>getAccumulatorResult(RUNTIME_ACC_NAME)
+                        + " ms",
+                expected,
+                actual,
+                .5 * expected);

Review comment:
       Yes, I meant watermarks, sorry.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #16415: [FLINK-23262][tests] Check watermark frequency instead of count

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #16415:
URL: https://github.com/apache/flink/pull/16415#issuecomment-875773502


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "4d9f0a3483b7360f064c318f8ebbc53eaeb88e59",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=20113",
       "triggerID" : "4d9f0a3483b7360f064c318f8ebbc53eaeb88e59",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 4d9f0a3483b7360f064c318f8ebbc53eaeb88e59 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=20113) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #16415: [FLINK-23262][tests] Check watermark frequency instead of count

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #16415:
URL: https://github.com/apache/flink/pull/16415#issuecomment-875773502


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "4d9f0a3483b7360f064c318f8ebbc53eaeb88e59",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=20113",
       "triggerID" : "4d9f0a3483b7360f064c318f8ebbc53eaeb88e59",
       "triggerType" : "PUSH"
     }, {
       "hash" : "251329bfc74f78dc4f0da29b76d10f1f952c9964",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=20125",
       "triggerID" : "251329bfc74f78dc4f0da29b76d10f1f952c9964",
       "triggerType" : "PUSH"
     }, {
       "hash" : "c4932fed849d9c0263f74f40d42c764255a4a165",
       "status" : "CANCELED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=20174",
       "triggerID" : "c4932fed849d9c0263f74f40d42c764255a4a165",
       "triggerType" : "PUSH"
     }, {
       "hash" : "f6787fb53d8d368feed7c2f44a3091c016f90378",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=20181",
       "triggerID" : "f6787fb53d8d368feed7c2f44a3091c016f90378",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * c4932fed849d9c0263f74f40d42c764255a4a165 Azure: [CANCELED](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=20174) 
   * f6787fb53d8d368feed7c2f44a3091c016f90378 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=20181) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org