Skip to content

Commit

Permalink
branch-2.1: [regression-test](fix) test_audit_log_behavior.groovy cas…
Browse files Browse the repository at this point in the history
…e bug #46588 (#46702)

Cherry-picked from #46588

Co-authored-by: shuke <[email protected]>
  • Loading branch information
github-actions[bot] and shuke987 authored Jan 10, 2025
1 parent c016eb4 commit e5000c2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions regression-test/suites/audit/test_audit_log_behavior.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -93,14 +93,15 @@ suite("test_audit_log_behavior") {
for (int i = 0; i < cnt; i++) {
def tuple2 = sqls.get(i)
def retry = 180
def res = sql "select stmt from __internal_schema.audit_log where stmt like 'insert%3F6B9A_${i}%' order by time asc limit 1"
def query = "select stmt from __internal_schema.audit_log where stmt like 'insert%3F6B9A_${i}%' order by time asc limit 1"
def res = sql "${query}"
while (res.isEmpty()) {
if (retry-- < 0) {
logger.warn("It has retried a few but still failed, you need to check it")
return
}
sleep(1000)
res = sql "select stmt from __internal_schema.audit_log where stmt like '%3F6B9A_${i}%' order by time asc limit 1"
res = sql "${query}"
}
assertEquals(res[0][0].toString(), tuple2[1].toString())
}
Expand Down

0 comments on commit e5000c2

Please sign in to comment.