GitHub user BorisOsipov opened a pull request: https://github.com/apache/flink/pull/2785
[FLINK-5006] SystemProcessingTimeServiceTest.testTimerSorting fails Hello! I'v reproduced this issue on my environment several times. I found that the test uses ScheduledThreadPoolExecutor as threadFactory (actually [SystemProcessingTimeService](https://github.com/apache/flink/blob/master/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/SystemProcessingTimeService.java) uses). ScheduledThreadPoolExecutor does not guarantee that tasks will be executed immediately after delay: > Delayed tasks execute no sooner than they are enabled, but without any real-time guarantees about when, after they are enabled, they will commence. See Oracle [docs ](http://bit.ly/2fobpXv) Thus, order of executions and adding timestamps to ArrayBlockingQueue isn't defined. So it looks like the test is not correct. In changes I increased intervals between tasks, it helps to avoid falling. If I am correct, maybe it makes sense to get rid of this test? You can merge this pull request into a Git repository by running: $ git pull https://github.com/BorisOsipov/flink FLINK-5006 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/flink/pull/2785.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #2785 ---- commit d53100c8361551a5eac29b6955ecb0fa93769a53 Author: Boris Osipov <boris_osi...@epam.com> Date: 2016-11-10T15:52:56Z [FLINK-5006] SystemProcessingTimeServiceTest.testTimerSorting fails Increases test stability ---- --- 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 infrastruct...@apache.org or file a JIRA ticket with INFRA. ---