You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by du...@apache.org on 2022/11/12 15:03:05 UTC

[shardingsphere] branch master updated: Refactor package structure of sql parser test result (#22125)

This is an automated email from the ASF dual-hosted git repository.

duanzhengqiang 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 7d389f003d1 Refactor package structure of sql parser test result (#22125)
7d389f003d1 is described below

commit 7d389f003d1b452ea072b1eb34d481713f0e0d19
Author: Liang Zhang <zh...@apache.org>
AuthorDate: Sat Nov 12 23:03:00 2022 +0800

    Refactor package structure of sql parser test result (#22125)
---
 .../sql/parser/engine/dialect/PostgreSQLParserParameterizedIT.java  | 2 +-
 .../sql/parser/result/SQLParserResultProcessorManager.java          | 6 +++---
 .../sql/parser/result/{ => impl}/SQLParserCSVResultProcessor.java   | 3 ++-
 .../sql/parser/result/{ => impl}/SQLParserLogResultProcessor.java   | 3 ++-
 4 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/test/integration-test/sql-parser/src/test/java/org/apache/shardingsphere/test/integration/sql/parser/engine/dialect/PostgreSQLParserParameterizedIT.java b/test/integration-test/sql-parser/src/test/java/org/apache/shardingsphere/test/integration/sql/parser/engine/dialect/PostgreSQLParserParameterizedIT.java
index 56fbf842539..685798bebdf 100644
--- a/test/integration-test/sql-parser/src/test/java/org/apache/shardingsphere/test/integration/sql/parser/engine/dialect/PostgreSQLParserParameterizedIT.java
+++ b/test/integration-test/sql-parser/src/test/java/org/apache/shardingsphere/test/integration/sql/parser/engine/dialect/PostgreSQLParserParameterizedIT.java
@@ -20,7 +20,7 @@ package org.apache.shardingsphere.test.integration.sql.parser.engine.dialect;
 import org.apache.shardingsphere.test.integration.sql.parser.engine.SQLParserParameterizedIT;
 import org.apache.shardingsphere.test.integration.sql.parser.loader.SQLCaseLoader;
 import org.apache.shardingsphere.test.integration.sql.parser.loader.impl.GitHubSQLCaseLoadStrategy;
-import org.apache.shardingsphere.test.integration.sql.parser.result.SQLParserCSVResultProcessor;
+import org.apache.shardingsphere.test.integration.sql.parser.result.impl.SQLParserCSVResultProcessor;
 import org.apache.shardingsphere.test.runner.ShardingSphereParallelTestParameterized;
 import org.junit.runner.RunWith;
 import org.junit.runners.Parameterized.Parameters;
diff --git a/test/integration-test/sql-parser/src/test/java/org/apache/shardingsphere/test/integration/sql/parser/result/SQLParserResultProcessorManager.java b/test/integration-test/sql-parser/src/test/java/org/apache/shardingsphere/test/integration/sql/parser/result/SQLParserResultProcessorManager.java
index 0efe216cb9a..fe8732562ad 100644
--- a/test/integration-test/sql-parser/src/test/java/org/apache/shardingsphere/test/integration/sql/parser/result/SQLParserResultProcessorManager.java
+++ b/test/integration-test/sql-parser/src/test/java/org/apache/shardingsphere/test/integration/sql/parser/result/SQLParserResultProcessorManager.java
@@ -31,9 +31,9 @@ import java.util.Objects;
 /**
  * Get the corresponding result processor through config.
  */
-@Slf4j
 @NoArgsConstructor(access = AccessLevel.PRIVATE)
-public class SQLParserResultProcessorManager {
+@Slf4j
+public final class SQLParserResultProcessorManager {
     
     /**
      * Get the SQL parser result processor.
@@ -64,6 +64,6 @@ public class SQLParserResultProcessorManager {
         } catch (final ReflectiveOperationException ex) {
             log.error("encounter exception when get SQLParserResultProcessor by reflection", ex);
         }
-        throw new IllegalArgumentException("The processor type does not supported : " + type);
+        throw new IllegalArgumentException("The processor type does not supported: " + type);
     }
 }
diff --git a/test/integration-test/sql-parser/src/test/java/org/apache/shardingsphere/test/integration/sql/parser/result/SQLParserCSVResultProcessor.java b/test/integration-test/sql-parser/src/test/java/org/apache/shardingsphere/test/integration/sql/parser/result/impl/SQLParserCSVResultProcessor.java
similarity index 96%
rename from test/integration-test/sql-parser/src/test/java/org/apache/shardingsphere/test/integration/sql/parser/result/SQLParserCSVResultProcessor.java
rename to test/integration-test/sql-parser/src/test/java/org/apache/shardingsphere/test/integration/sql/parser/result/impl/SQLParserCSVResultProcessor.java
index d12c90779c0..3bc7795d5ff 100644
--- a/test/integration-test/sql-parser/src/test/java/org/apache/shardingsphere/test/integration/sql/parser/result/SQLParserCSVResultProcessor.java
+++ b/test/integration-test/sql-parser/src/test/java/org/apache/shardingsphere/test/integration/sql/parser/result/impl/SQLParserCSVResultProcessor.java
@@ -15,12 +15,13 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.test.integration.sql.parser.result;
+package org.apache.shardingsphere.test.integration.sql.parser.result.impl;
 
 import lombok.Getter;
 import org.apache.commons.csv.CSVFormat;
 import org.apache.commons.csv.CSVPrinter;
 import org.apache.shardingsphere.test.integration.sql.parser.env.IntegrationTestEnvironment;
+import org.apache.shardingsphere.test.integration.sql.parser.result.SQLParserResultProcessor;
 
 import java.io.File;
 import java.io.FileWriter;
diff --git a/test/integration-test/sql-parser/src/test/java/org/apache/shardingsphere/test/integration/sql/parser/result/SQLParserLogResultProcessor.java b/test/integration-test/sql-parser/src/test/java/org/apache/shardingsphere/test/integration/sql/parser/result/impl/SQLParserLogResultProcessor.java
similarity index 92%
rename from test/integration-test/sql-parser/src/test/java/org/apache/shardingsphere/test/integration/sql/parser/result/SQLParserLogResultProcessor.java
rename to test/integration-test/sql-parser/src/test/java/org/apache/shardingsphere/test/integration/sql/parser/result/impl/SQLParserLogResultProcessor.java
index 8636a732535..337c37f04af 100644
--- a/test/integration-test/sql-parser/src/test/java/org/apache/shardingsphere/test/integration/sql/parser/result/SQLParserLogResultProcessor.java
+++ b/test/integration-test/sql-parser/src/test/java/org/apache/shardingsphere/test/integration/sql/parser/result/impl/SQLParserLogResultProcessor.java
@@ -15,10 +15,11 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.test.integration.sql.parser.result;
+package org.apache.shardingsphere.test.integration.sql.parser.result.impl;
 
 import lombok.Getter;
 import lombok.extern.slf4j.Slf4j;
+import org.apache.shardingsphere.test.integration.sql.parser.result.SQLParserResultProcessor;
 
 @Slf4j
 public class SQLParserLogResultProcessor implements SQLParserResultProcessor {