RocMarshal commented on code in PR #21999:
URL: https://github.com/apache/flink/pull/21999#discussion_r1116679594


##########
flink-streaming-java/src/test/java/org/apache/flink/streaming/runtime/tasks/StreamTaskTest.java:
##########
@@ -368,17 +368,19 @@ void testCleanUpExceptionSuppressing() throws Exception {
                         .setupOutputForSingletonOperatorChain(new 
FailingTwiceOperator())
                         .build()) {
 
-            assertThatThrownBy(
-                            () -> {
-                                testHarness.processElement(new 
StreamRecord<>("Doesn't matter", 0));
-                                throw new RuntimeException(
-                                        "Expected an exception but ran 
successfully");
-                            })
-                    .isInstanceOf(ExpectedTestException.class);
+            try {
+                testHarness.processElement(new StreamRecord<>("Doesn't 
matter", 0));
+                throw new RuntimeException("Expected an exception but ran 
successfully");
+            } catch (Exception ex) {
+                ExceptionUtils.assertThrowable(ex, 
ExpectedTestException.class);
+            }

Review Comment:
   nice.
   thx so much for the quick comments. 



-- 
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