xuyangzhong commented on code in PR #26752:
URL: https://github.com/apache/flink/pull/26752#discussion_r2188899423
##########
flink-table/flink-table-runtime/src/test/java/org/apache/flink/table/runtime/operators/join/deltajoin/StreamingDeltaJoinOperatorTest.java:
##########
@@ -529,6 +547,33 @@ void testClearLegacyStateWhenCheckpointing() throws
Exception {
"result mismatch", expectedOutput, testHarness.getOutput());
}
+ @Test
+ void testMeetExceptionWhenLookup() throws Exception {
+ Throwable expectedException = new IllegalStateException("Mock to
fail");
+ MyAsyncFunction.throwException(expectedException);
+
+ StreamRecord<RowData> record = insertRecord(100, true, "jklk1");
+ testHarness.processElement1(record);
+
+ // IllegalStateException(Failed to wait all data processed)
+ // +- Exception(Could not complete the stream element ...)
+ // +- RuntimeException(Failed to lookup table)
+ // +- Actual Exception
+ assertThatThrownBy(this::waitAllDataProcessed)
+ .cause()
+ .cause()
+ .cause()
+ .isEqualTo(expectedException);
+ }
+
+ private void waitAllDataProcessed() throws Exception {
+ testHarness.endAllInputs();
+ if (latestException.isPresent()) {
Review Comment:
ditto
--
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]