Stephan Ewen created FLINK-17671:
------------------------------------

             Summary: Simplify the ManuallyTriggeredScheduledExecutortriggering 
logic
                 Key: FLINK-17671
                 URL: https://issues.apache.org/jira/browse/FLINK-17671
             Project: Flink
          Issue Type: Improvement
          Components: Tests
            Reporter: Stephan Ewen
            Assignee: Stephan Ewen
             Fix For: 1.11.0


Currently, the ManuallyTriggeredScheduledExecutor for testing of actor-style 
components uses a complex dance to execute queued tasks. Even though the tasks 
are synchronously executed, they get get delegated via ComplatableFuture, using 
async supply of an execution stage, but with a synchronous executor injected 
via a lambda.

Sounds complicated, and it is. And for no reason, as far as I can tell. It does 
just as much (or as little) as directly calling {{run()}} on the enqueued task.

The advantage simply calling {{run()}} is that it is very easy to trace and for 
the debugger to step into. For the complex dance above, it becomes rather 
laborious and involved to try and find your way into the actual {{Runnable}} 
execution.

This fix proposes to simplify the trigger() method to call {{run()}} directly.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to