This is an automated email from the ASF dual-hosted git repository. airborne pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push: new 9e57929fa19 [regression-test](case) audit log case (#47456) 9e57929fa19 is described below commit 9e57929fa19d1de7ca88b597d6de020c2cadc62c Author: shuke <sh...@selectdb.com> AuthorDate: Wed Jan 29 14:02:37 2025 +0800 [regression-test](case) audit log case (#47456) --- .../suites/audit/test_audit_log_behavior.groovy | 52 ++++++++++------------ 1 file changed, 23 insertions(+), 29 deletions(-) diff --git a/regression-test/suites/audit/test_audit_log_behavior.groovy b/regression-test/suites/audit/test_audit_log_behavior.groovy index 6b6e7cf5871..8cba62e03e2 100644 --- a/regression-test/suites/audit/test_audit_log_behavior.groovy +++ b/regression-test/suites/audit/test_audit_log_behavior.groovy @@ -73,39 +73,33 @@ suite("test_audit_log_behavior") { qt_audit_log_schema """desc internal.__internal_schema.audit_log""" - for (def on : [true, false]) { - sql "set enable_nereids_planner=${on}" - sql "truncate table __internal_schema.audit_log" - // run queries - for (int i = 0; i < cnt; i++) { - def tuple2 = sqls.get(i) - sql tuple2[0] - } + sql "truncate table __internal_schema.audit_log" + // run queries + for (int i = 0; i < cnt; i++) { + def tuple2 = sqls.get(i) + sql tuple2[0] + } - if (on == true) { - // only new planner supports call flush_audit_log - // make sure audit event is created. - // see WorkloadRuntimeStatusMgr.getQueryNeedAudit() - Thread.sleep(6000) - sql """call flush_audit_log()""" - } - // check result - for (int i = 0; i < cnt; i++) { - def tuple2 = sqls.get(i) - def retry = 180 - 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 "${query}" + Thread.sleep(6000) + sql """call flush_audit_log()""" + + // check result + for (int i = 0; i < cnt; i++) { + def tuple2 = sqls.get(i) + def retry = 180 + 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 } - assertEquals(res[0][0].toString(), tuple2[1].toString()) + sleep(1000) + res = sql "${query}" } + assertEquals(res[0][0].toString(), tuple2[1].toString()) } + // do not turn off sql "set global enable_audit_plugin = false" sql "set global audit_plugin_max_sql_length = 4096" --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org