ChrisSamo632 commented on code in PR #7940:
URL: https://github.com/apache/nifi/pull/7940#discussion_r1539989744


##########
nifi-mock/src/main/java/org/apache/nifi/util/StandardProcessorTestRunner.java:
##########
@@ -229,33 +226,32 @@ public void run(final int iterations, final boolean 
stopOnFinish, final boolean
                 executorService.awaitTermination(runWait, 
TimeUnit.MILLISECONDS);
             } catch (final InterruptedException e1) {
             }
+        }
 
-            int finishedCount = 0;
-            boolean unscheduledRun = false;
-            for (final Future<Throwable> future : futures) {
-                try {
-                    final Throwable thrown = future.get(); // wait for the 
result
-                    if (thrown != null) {
-                        throw new AssertionError(thrown);
-                    }
+        int finishedCount = 0;
+        boolean unscheduledRun = false;
+        for (final Future<Throwable> future : futures) {
+            try {
+                final Throwable thrown = future.get(); // wait for the result
+                if (thrown != null) {
+                    throw new AssertionError(thrown);
+                }
 
-                    if (++finishedCount == 1 && stopOnFinish) {
-                        unscheduledRun = true;
-                        unSchedule();
-                    }
-                } catch (final Exception e) {
+                if (++finishedCount == 1 && stopOnFinish) {
+                    unscheduledRun = true;
+                    unSchedule();
                 }
+            } catch (final Exception e) {
+                e.printStackTrace();

Review Comment:
   The `Exception` capture is nothing new, just previously it was being 
silently ignored, so I thought I'd at least indicate that the `catch` had been 
triggered, without potentially causing problems for lots of tests across the 
existing estate
   
   Happy to revert this and silently swallow the `InterruptedException` & 
`ExecutionException`s, although I'll change it from catching all `Exception`s 
at the least
   
   This approach matches other similar handling elsewhere within the 
`TestRunner`



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to