wuchong commented on a change in pull request #15197: URL: https://github.com/apache/flink/pull/15197#discussion_r595704999
########## File path: flink-table/flink-sql-client/src/test/java/org/apache/flink/table/client/cli/CliClientITCase.java ########## @@ -155,6 +155,19 @@ public void testSqlStatements() throws IOException { private static final String ERROR_BEGIN = "\u001B[31;1m"; private static final String ERROR_END = "\u001B[0m"; + private static String getInputFromPath(String sqlPath) throws IOException { + URL url = CliClientITCase.class.getResource("/" + sqlPath); + String in = IOUtils.toString(url, StandardCharsets.UTF_8); + // replace the placeholder with specified value if exists + return StringUtils.replaceEach( + in, + new String[] {"$VAR_PIPELINE_JARS", "$VAR_REST_PORT"}, + new String[] { + udfDependency.toString(), + miniClusterResource.getClientConfiguration().get(PORT).toString() Review comment: I think the replace variables will be more in the future, maintian them in two separate list is not good. Personally, I perfer to have a private static `Map<String, String> REPLACE_VARS` and initialize the map in `setup` method. ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org