branch-2.1: [opt](regression-test) Adjust the stream load timeout check of the regression framework #47037 (#47049)
cherry pick from #47037
This commit is contained in:
@ -343,10 +343,12 @@ class StreamLoadAction implements SuiteAction {
|
||||
|
||||
if (time > 0) {
|
||||
long elapsed = endTime - startTime
|
||||
try{
|
||||
Assert.assertTrue("Expect elapsed <= ${time}, but meet ${elapsed}", elapsed <= time)
|
||||
try {
|
||||
// stream load may cost more time than expected in regression test, because of case run in parallel.
|
||||
// So we allow stream load cost more time, use 3 * time as threshold.
|
||||
Assert.assertTrue("Stream load Expect elapsed <= 3 * ${time}, but meet ${elapsed}", elapsed <= 3 * time)
|
||||
} catch (Throwable t) {
|
||||
throw new IllegalStateException("Expect elapsed <= ${time}, but meet ${elapsed}")
|
||||
throw new IllegalStateException("Stream load Expect elapsed <= 3 * ${time}, but meet ${elapsed}")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user