carlvinhust2012 commented on code in PR #19239:
URL: https://github.com/apache/doris/pull/19239#discussion_r1186688456
##########
regression-test/framework/src/main/groovy/org/apache/doris/regression/suite/Suite.groovy:
##########
@@ -418,6 +418,21 @@ class Suite implements GroovyInterceptable {
Assert.assertEquals("SUCCESS", status)
}
+ void waitForS3LoadFinished(String label) {
+ // check load state
+ while (true) {
+ def stateResult = sql "show load where Label = '${label}'"
+ logger.info("load result is ${stateResult}")
+ def loadState = stateResult[stateResult.size() - 1][2].toString()
+ if ("CANCELLED".equalsIgnoreCase(loadState)) {
+ throw new IllegalStateException("load ${label} failed.")
+ } else if ("FINISHED".equalsIgnoreCase(loadState)) {
+ break
+ }
+ sleep(5000)
Review Comment:
sleep(5000) is not alway guarantee that the load is successful,may be check
the return status and retry is more better.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]