snuyanzin commented on code in PR #28790:
URL: https://github.com/apache/flink/pull/28790#discussion_r3667451420


##########
flink-table/flink-table-planner/src/test/java/org/apache/flink/table/planner/runtime/batch/sql/CreateConnectionITCase.java:
##########
@@ -73,10 +78,35 @@ void 
testCreatePermanentConnectionRejectedWithoutSecretStore() {
                 .hasMessageContaining("WritableSecretStore must be 
configured");
     }
 
+    @Test
+    void testShowConnections() {
+        tEnv().executeSql("CREATE TEMPORARY CONNECTION b_conn WITH ('k' = 
'v')");
+        tEnv().executeSql("CREATE TEMPORARY CONNECTION a_conn WITH ('k' = 
'v')");
+
+        assertThat(collectRows("SHOW CONNECTIONS"))
+                .containsExactly(Row.of("a_conn"), Row.of("b_conn"));
+    }
+
+    @Test
+    void testShowConnectionsLike() {
+        tEnv().executeSql("CREATE TEMPORARY CONNECTION prod_conn WITH ('k' = 
'v')");
+        tEnv().executeSql("CREATE TEMPORARY CONNECTION tmp_conn WITH ('k' = 
'v')");
+
+        assertThat(collectRows("SHOW CONNECTIONS LIKE 'prod_%'"))
+                .containsExactly(Row.of("prod_conn"));
+        assertThat(collectRows("SHOW CONNECTIONS NOT LIKE 'prod_%'"))
+                .containsExactly(Row.of("tmp_conn"));
+    }

Review Comment:
   why do we need 2 separate tests?
   why same can't be done in one?



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

Reply via email to