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 2020/05/03 03:20:56 UTC

[GitHub] [shardingsphere] cherrylzhao commented on a change in pull request #5413: optimize integrate framework

cherrylzhao commented on a change in pull request #5413:
URL: https://github.com/apache/shardingsphere/pull/5413#discussion_r419040060



##########
File path: sharding-integration-test/sharding-jdbc-test/src/test/java/org/apache/shardingsphere/dbtest/engine/SingleIT.java
##########
@@ -39,13 +42,29 @@
     
     private final String sql;
     
+    private final String originalSQL;
+    
     public SingleIT(final String path, final IntegrateTestCaseAssertion assertion, final String ruleType,
                     final DatabaseType databaseType, final SQLCaseType caseType, final String sql) throws IOException, JAXBException, SQLException, ParseException {
         super(ruleType, databaseType);
         this.assertion = assertion;
         this.caseType = caseType;
-        this.sql = sql;
+        this.originalSQL = sql;
+        this.sql = convert(sql);
         expectedDataFile = getExpectedDataFile(path, ruleType, databaseType, null != assertion ? assertion.getExpectedDataFile() : null);
     }
+    
+    private String convert(final String sql) throws ParseException {
+        return caseType == SQLCaseType.Literal ? getLiteralSQL(sql) : sql;
+    }
+    
+    private String getLiteralSQL(final String sql) throws ParseException {
+        final List<Object> parameters = null != assertion ? assertion.getSQLValues().stream().map(SQLValue::toString).collect(Collectors.toList()) : null;

Review comment:
       have fixed it

##########
File path: sharding-integration-test/sharding-jdbc-test/src/test/java/org/apache/shardingsphere/dbtest/engine/util/IntegrateTestParameters.java
##########
@@ -168,7 +152,7 @@ private static void printTestPlan(final Map<DatabaseType, Collection<Object[]>>
             disabledPlan.add(String.format("%s(%s)", entry.getKey().getName(), entry.getValue().size() * factor));
         }
         System.out.println("[INFO] ======= Test Plan =======");
-        String summary = String.format("[%s] Total: %s, Active: %s, Disabled: %s",
+        String summary = String.format("[%s] Total: %s, Active: %s, Disabled: %s \n",

Review comment:
       have fixed it




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

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