You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by pa...@apache.org on 2022/10/03 05:23:53 UTC
[shardingsphere] branch master updated: Remove test case for static impl (#21326)
This is an automated email from the ASF dual-hosted git repository.
panjuan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere.git
The following commit(s) were added to refs/heads/master by this push:
new 5da74ed253d Remove test case for static impl (#21326)
5da74ed253d is described below
commit 5da74ed253d4c435fcc307ab225111509faa0063
Author: Liang Zhang <zh...@apache.org>
AuthorDate: Mon Oct 3 13:23:43 2022 +0800
Remove test case for static impl (#21326)
---
.../handler/query/SQLParserRuleQueryResultSetTest.java | 13 ++-----------
1 file changed, 2 insertions(+), 11 deletions(-)
diff --git a/shardingsphere-kernel/shardingsphere-parser/shardingsphere-parser-distsql/shardingsphere-parser-distsql-handler/src/test/java/org/apache/shardingsphere/parser/distsql/handler/query/SQLParserRuleQueryResultSetTest.java b/shardingsphere-kernel/shardingsphere-parser/shardingsphere-parser-distsql/shardingsphere-parser-distsql-handler/src/test/java/org/apache/shardingsphere/parser/distsql/handler/query/SQLParserRuleQueryResultSetTest.java
index d416be9bfa3..c2b7cc72e6b 100644
--- a/shardingsphere-kernel/shardingsphere-parser/shardingsphere-parser-distsql/shardingsphere-parser-distsql-handler/src/test/java/org/apache/shardingsphere/parser/distsql/handler/query/SQLParserRuleQueryResultSetTest.java
+++ b/shardingsphere-kernel/shardingsphere-parser/shardingsphere-parser-distsql/shardingsphere-parser-distsql-handler/src/test/java/org/apache/shardingsphere/parser/distsql/handler/query/SQLParserRuleQueryResultSetTest.java
@@ -17,7 +17,6 @@
package org.apache.shardingsphere.parser.distsql.handler.query;
-import java.util.Arrays;
import org.apache.shardingsphere.infra.metadata.database.rule.ShardingSphereRuleMetaData;
import org.apache.shardingsphere.parser.config.SQLParserRuleConfiguration;
import org.apache.shardingsphere.parser.distsql.parser.statement.queryable.ShowSQLParserRuleStatement;
@@ -25,6 +24,7 @@ import org.apache.shardingsphere.parser.rule.SQLParserRule;
import org.apache.shardingsphere.sql.parser.api.CacheOption;
import org.junit.Test;
+import java.util.Arrays;
import java.util.Collection;
import java.util.Iterator;
import java.util.Optional;
@@ -63,20 +63,11 @@ public final class SQLParserRuleQueryResultSetTest {
assertThat(new SQLParserRuleQueryResultSet().getColumnNames(), is(Arrays.asList("sql_comment_parse_enable", "parse_tree_cache", "sql_statement_cache")));
}
- @Test
- public void assertGetType() {
- assertThat(new SQLParserRuleQueryResultSet().getType(), is(ShowSQLParserRuleStatement.class.getName()));
- }
-
private ShardingSphereRuleMetaData mockGlobalRuleMetaData() {
SQLParserRule sqlParserRule = mock(SQLParserRule.class);
- when(sqlParserRule.getConfiguration()).thenReturn(createSQLParserRuleConfiguration());
+ when(sqlParserRule.getConfiguration()).thenReturn(new SQLParserRuleConfiguration(true, new CacheOption(128, 1024), new CacheOption(2000, 65535)));
ShardingSphereRuleMetaData result = mock(ShardingSphereRuleMetaData.class);
when(result.findSingleRule(SQLParserRule.class)).thenReturn(Optional.of(sqlParserRule));
return result;
}
-
- private SQLParserRuleConfiguration createSQLParserRuleConfiguration() {
- return new SQLParserRuleConfiguration(true, new CacheOption(128, 1024), new CacheOption(2000, 65535));
- }
}