rkhachatryan commented on a change in pull request #10345: [FLINK-12484][runtime] synchronize all mailbox actions URL: https://github.com/apache/flink/pull/10345#discussion_r353089282
########## File path: flink-streaming-java/src/test/java/org/apache/flink/streaming/runtime/tasks/StreamTaskTest.java ########## @@ -318,17 +319,10 @@ public void testStateBackendClosingOnFailure() throws Exception { @Test public void testCancellationNotBlockedOnLock() throws Exception { syncLatch = new OneShotLatch(); - - StreamConfig cfg = new StreamConfig(new Configuration()); - Task task = createTask(CancelLockingTask.class, cfg, new Configuration()); - - // start the task and wait until it runs - // execution state RUNNING is not enough, we need to wait until the stream task's run() method - // is entered + task = createTask(CancelLockingTask.class, new StreamConfig(new Configuration()), new Configuration()); task.startTaskThread(); - syncLatch.await(); - // cancel the execution - this should lead to smooth shutdown + syncLatch.await(); // wait for the main loop to start task.cancelExecution(); task.getExecutingThread().join(); Review comment: You're right, addressed it. ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services