Shekharrajak commented on code in PR #28790:
URL: https://github.com/apache/flink/pull/28790#discussion_r4668092004
##########
flink-table/flink-table-planner/src/test/java/org/apache/flink/table/planner/runtime/common/sql/ConnectionITCase.java:
##########
@@ -161,12 +190,69 @@ void testShowCreateSecretOnlyTemporaryConnection() {
.containsOnly(entry("type",
"default")));
}
- @Test
- void testDescribeTemporaryConnection() {
- tEnv().executeSql(
- "CREATE TEMPORARY CONNECTION my_conn COMMENT 'hi
there' "
- + "WITH ('type' = 'default', 'k' = 'v',
'comment' = 'option comment', "
- + "'password' = 'super-secret')");
+ @TestTemplate
+ void testShowConnections() throws Exception {
+ ObjectIdentifier identifier = connectionIdentifier("permanent_conn");
+ catalogManager()
+ .getCatalog(identifier.getCatalogName())
+ .orElseThrow()
+ .createConnection(
+ identifier.toObjectPath(),
+ CatalogConnection.of(Map.of("k", "v"), null),
+ false);
+ 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"),
Row.of("permanent_conn"));
+ assertThat(collectRows("SHOW CONNECTIONS FROM " +
identifier.getDatabaseName()))
+ .containsExactly(Row.of("a_conn"), Row.of("b_conn"),
Row.of("permanent_conn"));
+ }
+
+ @TestTemplate
+ void testShowConnectionsInDatabase() throws Exception {
Review Comment:
Updated
--
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]