sandynz commented on code in PR #22013:
URL: https://github.com/apache/shardingsphere/pull/22013#discussion_r1016583271
##########
test/integration-test/scaling/src/test/java/org/apache/shardingsphere/integration/data/pipeline/cases/base/BaseITCase.java:
##########
@@ -224,6 +225,16 @@ protected void proxyExecuteWithLog(final String sql, final
int sleepSeconds) thr
ThreadUtil.sleep(Math.max(sleepSeconds, 0), TimeUnit.SECONDS);
}
+ protected void waitJobPrepareSuccess(final String distSQL) {
+ for (int i = 0; i < 5; i++) {
+ List<Map<String, Object>> jobStatus = queryForListWithLog(distSQL);
+ Set<String> statusSet = jobStatus.stream().map(each ->
String.valueOf(each.get("status"))).collect(Collectors.toSet());
+ if (statusSet.contains(JobStatus.PREPARING.name()) ||
statusSet.contains(JobStatus.RUNNING.name()) ||
statusSet.contains(JobStatus.PREPARE_SUCCESS.name())) {
+ ThreadUtil.sleep(2, TimeUnit.SECONDS);
+ }
Review Comment:
Seems it does not need to sleep when job status is `PREPARE_SUCCESS`
--
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]