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:
Xin Liao
2025-01-16 17:02:16 +08:00
committed by GitHub
parent a85b5eb9d0
commit ce98073a1b

View File

@ -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}")
}
}
}