sandynz commented on code in PR #21194:
URL: https://github.com/apache/shardingsphere/pull/21194#discussion_r979927308


##########
shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-scaling/src/test/java/org/apache/shardingsphere/integration/data/pipeline/cases/migration/AbstractMigrationITCase.java:
##########
@@ -159,10 +162,20 @@ protected String getJobIdByTableName(final String 
tableName) {
         return jobList.stream().filter(a -> 
a.get("tables").toString().equals(tableName)).findFirst().orElseThrow(() -> new 
RuntimeException("not find " + tableName + " table")).get("id").toString();
     }
     
-    protected void assertCheckMigrationSuccess(final String jobId, final 
String algorithmType) {
-        List<Map<String, Object>> checkJobResults = 
queryForListWithLog(String.format("CHECK MIGRATION '%s' BY TYPE (NAME='%s')", 
jobId, algorithmType));
+    protected void assertCheckMigrationSuccess(final String jobId, final 
String algorithmType) throws SQLException {
+        proxyExecuteWithLog(String.format("CHECK MIGRATION '%s' BY TYPE 
(NAME='%s')", jobId, algorithmType), 0);
+        List<Map<String, Object>> checkJobResults = Collections.emptyList();
+        for (int i = 0; i < 10; i++) {
+            checkJobResults = queryForListWithLog(String.format("SHOW 
MIGRATION CHECK STATUS '%s'", jobId));
+            if (null != checkJobResults && !checkJobResults.isEmpty()) {
+                break;
+            }
+            ThreadUtil.sleep(3, TimeUnit.SECONDS);
+        }

Review Comment:
   OK



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

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to