Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-23689

TestProcessingTimeService.setCurrentTime(long) not delay the firing timer by 1ms delay

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Not a Priority
    • Resolution: Unresolved
    • 1.11.4, 1.14.0, 1.12.4, 1.13.2
    • None
    • Runtime / Task, Tests
    • None

    Description

      FLINK-9857 enabled SystemProcessingTimeService to fire processing timers by 1ms delay but it ignored TestProcessingTimeService, and the method TestProcessingTimeService.setCurrentTime can still trigger the processing timers whose timestamp equals to currentTime.

      while (!priorityQueue.isEmpty() && currentTime >= priorityQueue.peek().f0) {
          ..
      }
      

      We can simply fix the problem with currentTime > priorityQueue.peek().f0, but it will break too many existing tests:

      • Tests using TestProcessingTimeService.setCurrentTime(long) (64 usage)
      • Tests using AbstractStreamOperatorTestHarness.setProcessingTime(long) (368 usage)

      Tips: Some tests can be fixed with plusing 1ms on the parameter of TestProcessingTimeService.setCurrentTime(long), but this doesn't work in tests that invokes setCurrentTime(long) for serveral times.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              wind_ljy Jiayi Liao
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated: