terrymanu commented on a change in pull request #7300:
URL: https://github.com/apache/shardingsphere/pull/7300#discussion_r484482539



##########
File path: 
shardingsphere-integration-test/shardingsphere-test-suite/src/test/java/org/apache/shardingsphere/dbtest/env/dataset/DataSetEnvironmentManager.java
##########
@@ -187,4 +186,25 @@ private String generateTableName(final String tableName, 
final DatabaseType data
                 throw new UnsupportedOperationException(String.format("Cannot 
support database [%s].", databaseType));
         }
     }
+    
+    @RequiredArgsConstructor
+    private static class CallableClear implements Callable<Boolean> {

Review comment:
       It is better to rename `CallableClear` to `ClearTask`

##########
File path: 
shardingsphere-integration-test/shardingsphere-test-suite/src/test/java/org/apache/shardingsphere/dbtest/env/dataset/DataSetEnvironmentManager.java
##########
@@ -126,25 +132,18 @@ private void setParameters(final PreparedStatement 
preparedStatement, final SQLV
     /**
      * Clear data.
      * 
-     * @throws SQLException SQL exception
      */
-    public void clear() throws SQLException {
+    public void clear() {
+        List<Callable<Boolean>> clearNodes = new ArrayList<>();
         for (Entry<String, Collection<String>> entry : 
getDataNodeMap().entrySet()) {
-            clear(entry.getKey(), entry.getValue());
+            CallableClear callableClear = new 
CallableClear(dataSourceMap.get(entry.getKey()), entry.getValue());
+            clearNodes.add(callableClear);

Review comment:
       `new CallableClear` can be inline into clearNodes.add

##########
File path: 
shardingsphere-integration-test/shardingsphere-test-suite/src/test/java/org/apache/shardingsphere/dbtest/env/dataset/DataSetEnvironmentManager.java
##########
@@ -126,25 +132,18 @@ private void setParameters(final PreparedStatement 
preparedStatement, final SQLV
     /**
      * Clear data.
      * 
-     * @throws SQLException SQL exception
      */
-    public void clear() throws SQLException {
+    public void clear() {
+        List<Callable<Boolean>> clearNodes = new ArrayList<>();

Review comment:
       It is better to rename `clearNodes` to `clearTasks`




----------------------------------------------------------------
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:
[email protected]


Reply via email to