zentol commented on code in PR #24309:
URL: https://github.com/apache/flink/pull/24309#discussion_r1488733497


##########
flink-test-utils-parent/flink-test-utils-junit/src/main/java/org/apache/flink/core/testutils/ManuallyTriggeredScheduledExecutorService.java:
##########
@@ -318,11 +319,22 @@ public void triggerNonPeriodicScheduledTasks(Class<?> 
taskClazz) {
     public void triggerPeriodicScheduledTasks() {
         for (ScheduledTask<?> scheduledTask : periodicScheduledTasks) {
             if (!scheduledTask.isCancelled()) {
-                scheduledTask.execute();
+                executeScheduledTask(scheduledTask);
             }
         }
     }
 
+    private static void executeScheduledTask(ScheduledTask<?> scheduledTask) {
+        scheduledTask.execute();
+        try {
+            // try to retrieve result of scheduled task to avoid swallowing 
any exceptions that
+            // occurred
+            scheduledTask.get();

Review Comment:
   This blocking call breaks a lot of stuff. I don't think we can make this 
change; too many tests rely on throwing something in the executor, and later 
triggering the completion once some condition is fulfilled.
   
   Maybe handle exceptions as fatal errors tho. Maybe that breaks fewer things.



-- 
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-unsubscr...@flink.apache.org

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

Reply via email to