Shekharrajak commented on code in PR #28789:
URL: https://github.com/apache/flink/pull/28789#discussion_r4178018100


##########
flink-table/flink-table-planner/src/test/java/org/apache/flink/table/planner/runtime/common/sql/ConnectionITCase.java:
##########
@@ -73,6 +73,29 @@ void 
testCreatePermanentConnectionRejectedWithoutSecretStore() {
                 .hasMessageContaining("WritableSecretStore must be 
configured");
     }
 
+    @Test
+    void testDropTemporaryConnection() {
+        tEnv().executeSql("CREATE TEMPORARY CONNECTION my_conn WITH ('k' = 
'v')");
+
+        tEnv().executeSql("DROP TEMPORARY CONNECTION my_conn");
+
+        
assertThat(catalogManager().getConnection(connectionIdentifier("my_conn"))).isEmpty();
+    }
+
+    @Test
+    void testDropTemporaryConnectionIfExists() {
+        tEnv().executeSql("DROP TEMPORARY CONNECTION IF EXISTS my_conn");
+
+        
assertThat(catalogManager().getConnection(connectionIdentifier("my_conn"))).isEmpty();
+    }
+
+    @Test
+    void testDropMissingTemporaryConnectionRejected() {
+        assertThatThrownBy(() -> tEnv().executeSql("DROP TEMPORARY CONNECTION 
my_conn"))
+                .isInstanceOf(ValidationException.class)
+                .hasMessageContaining("Temporary connection with identifier");

Review Comment:
   updated - 
https://github.com/apache/flink/pull/28789/changes#diff-73ede97c14addb5cabf98b0988102c12d679a2faccb648992937b2f49904d095R135
 



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