MartijnVisser commented on code in PR #28404:
URL: https://github.com/apache/flink/pull/28404#discussion_r3433157208
##########
flink-table/flink-table-planner/src/test/java/org/apache/flink/table/planner/plan/nodes/exec/testutils/RestoreTestBase.java:
##########
@@ -276,6 +282,30 @@ private void registerSinkObserver(
});
}
+ private void awaitExpectedResults(
+ final TableTestProgram program, final List<CompletableFuture<?>>
futures)
+ throws Exception {
+ try {
+ CompletableFuture.allOf(futures.toArray(new CompletableFuture[0]))
+ .get(RESULT_AWAIT_TIMEOUT_MILLIS, TimeUnit.MILLISECONDS);
+ } catch (TimeoutException e) {
+ final StringBuilder message = new StringBuilder();
+ message.append("Sink did not produce the expected results within ")
+ .append(RESULT_AWAIT_TIMEOUT_MILLIS)
+ .append("ms for program '")
+ .append(program.id)
+ .append("'.");
+ for (SinkTestStep sinkTestStep : program.getSetupSinkTestSteps()) {
+ message.append(System.lineSeparator())
+ .append("Sink '")
+ .append(sinkTestStep.name)
+ .append("' actual results: ")
Review Comment:
Yes, good call. The timeout message now logs each sink's expected results
alongside the actual.
--
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]