From 2adcca3301cb7e6f3af9aaf9e214c30f8456550e Mon Sep 17 00:00:00 2001 From: Noel Kwan <47273164+kwannoel@users.noreply.github.com> Date: Tue, 25 Jun 2024 18:37:27 +0800 Subject: [PATCH] fix(simulation): do not run background ddl on skipped tests (#17440) --- src/tests/simulation/src/slt.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/tests/simulation/src/slt.rs b/src/tests/simulation/src/slt.rs index e2fdfb6b54bb..943d9bffcf4c 100644 --- a/src/tests/simulation/src/slt.rs +++ b/src/tests/simulation/src/slt.rs @@ -20,7 +20,7 @@ use anyhow::{bail, Result}; use itertools::Itertools; use rand::{thread_rng, Rng, SeedableRng}; use rand_chacha::ChaChaRng; -use sqllogictest::{ParallelTestError, QueryExpect, Record, StatementExpect}; +use sqllogictest::{Condition, ParallelTestError, QueryExpect, Record, StatementExpect}; use crate::client::RisingWave; use crate::cluster::{Cluster, KillOpts}; @@ -274,6 +274,11 @@ pub async fn run_slt_task( } = &record && matches!(cmd, SqlCmd::CreateMaterializedView { .. }) && !manual_background_ddl_enabled + && conditions.iter().all(|c| { + *c != Condition::SkipIf { + label: "madsim".to_string(), + } + }) { let background_ddl_setting = rng.gen_bool(background_ddl_rate); let set_background_ddl = Record::Statement {