bvarghese1 commented on code in PR #24020: URL: https://github.com/apache/flink/pull/24020#discussion_r1447721761
########## flink-table/flink-table-api-java/src/test/java/org/apache/flink/table/test/program/TableTestProgram.java: ########## @@ -198,6 +198,18 @@ public SqlTestStep getRunSqlTestStep() { return (SqlTestStep) sqlSteps.get(0); } + /** + * Convenience method to avoid boilerplate code. It assumes only one statement set is tested. + */ + public StatementSetTestStep getRunStatementSetTestStep() { + List<TestStep> statementSetSteps = + runSteps.stream() + .filter(s -> s.getKind() == TestKind.STATEMENT_SET) + .collect(Collectors.toList()); + + return (StatementSetTestStep) statementSetSteps.get(0); Review Comment: Added a precondition check to verify similar to `getRunSqlTestStep` -- 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