You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2022/02/28 07:43:50 UTC

[GitHub] [shardingsphere] LeeGuoPing commented on a change in pull request #15640: Add IF EXISTS keyword to DROP SHARDING ALGORITHM;

LeeGuoPing commented on a change in pull request #15640:
URL: https://github.com/apache/shardingsphere/pull/15640#discussion_r815642586



##########
File path: shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-handler/src/test/java/org/apache/shardingsphere/sharding/distsql/update/DropShardingAlgorithmStatementUpdaterTest.java
##########
@@ -53,16 +53,31 @@ public void assertCheckSQLStatementWithoutCurrentRule() throws RuleDefinitionVio
         updater.checkSQLStatement(shardingSphereMetaData, new DropShardingAlgorithmStatement(Collections.emptyList()), null);
     }
     
+    @Test(expected = RequiredAlgorithmMissedException.class)
+    public void assertCheckSQLStatementWithoutCurrentRuleWithIfExists() throws RuleDefinitionViolationException {
+        updater.checkSQLStatement(shardingSphereMetaData, new DropShardingAlgorithmStatement(true, Collections.emptyList()), null);
+    }
+    

Review comment:
       @lanchengx  will check `currentConfig` is null or else
   ![image](https://user-images.githubusercontent.com/35389145/155943575-217f9398-665c-4763-abdf-349b880e7013.png)
    




-- 
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: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org