godfreyhe commented on a change in pull request #11918:
URL: https://github.com/apache/flink/pull/11918#discussion_r416549092



##########
File path: 
flink-table/flink-sql-client/src/test/java/org/apache/flink/table/client/gateway/local/LocalExecutorITCase.java
##########
@@ -649,6 +703,57 @@ public void testBatchQueryExecution() throws Exception {
                }
        }
 
+       @Test(timeout = 90_000L)
+       public void testBatchQueryCancel() throws Exception {
+               final Map<String, String> replaceVars = new HashMap<>();
+               replaceVars.put("$VAR_PLANNER", planner);
+               replaceVars.put("$VAR_EXECUTION_TYPE", "batch");
+               replaceVars.put("$VAR_RESULT_MODE", "table");
+               replaceVars.put("$VAR_MAX_ROWS", "100");
+               final LocalExecutor executor = createModifiedExecutor(
+                               DEFAULTS_SIMPLE_ENVIRONMENT_FILE, 
clusterClient, replaceVars);
+               final SessionContext session = new 
SessionContext("test-session", new Environment());
+               String sessionId = executor.openSession(session);
+               assertEquals("test-session", sessionId);
+
+               try {
+                       // create a bounded source, which will send a record 
per second until 100000000 records.
+                       String ddl = "CREATE TABLE MyRandomSource (\n" +
+                                       "  a INT,\n" +
+                                       "  b BIGINT\n" +
+                                       ") WITH (\n" +
+                                       "  'connector.type' = 'random',\n" +
+                                       "  'random.limit' = '100000000',\n" +

Review comment:
       we can limit that




----------------------------------------------------------------
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:
[email protected]


Reply via email to