Airblader commented on a change in pull request #18151:
URL: https://github.com/apache/flink/pull/18151#discussion_r772686276



##########
File path: 
flink-table/flink-table-planner/src/test/java/org/apache/flink/table/planner/runtime/stream/table/DataGeneratorConnectorITCase.java
##########
@@ -69,6 +73,33 @@ public void testTypes() throws Exception {
             }
         }
 
-        Assert.assertEquals("Unexpected number of results", 10, 
results.size());
+        assertThat(results.size()).isEqualTo(10);
+    }
+
+    @Test
+    public void testLimit() throws Exception {
+        final TestingTableEnvironment env = TestingTableEnvironment
+                .create(
+                        
EnvironmentSettings.newInstance().inStreamingMode().build(),
+                        null,
+                        new TableConfig());
+
+        env.executeSql("CREATE TABLE datagen_t (\n"
+                + "    f0 CHAR(1)\n"
+                + ") WITH ("
+                + "    'connector' = 'datagen'"
+                + ")");
+
+        List<Row> results = new ArrayList<>();
+
+        try (CloseableIterator<Row> iter = env
+                .executeSql("select * from datagen_t limit 5")

Review comment:
       This test actually still doesn't test the limit pushdown support of this 
source as the test cannot distinguish that from the limit applied generically 
over all sources.




-- 
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


Reply via email to