diff --git a/src/tests/simulation/src/slt.rs b/src/tests/simulation/src/slt.rs index 69cc501a7e231..26f44c7906641 100644 --- a/src/tests/simulation/src/slt.rs +++ b/src/tests/simulation/src/slt.rs @@ -299,30 +299,37 @@ pub async fn run_slt_task( } break; } - // allow 'table exists' error when retry CREATE statement - Err(e) - if matches!( - cmd, + Err(e) => { + match cmd { + // allow 'table exists' error when retry CREATE statement SqlCmd::Create { - is_create_table_as: false - } | SqlCmd::CreateMaterializedView { .. } - ) && i != 0 - && e.to_string().contains("exists") - && e.to_string().contains("Catalog error") => - { - break - } - // allow 'not found' error when retry DROP statement - Err(e) - if cmd == SqlCmd::Drop - && i != 0 - && e.to_string().contains("not found") - && e.to_string().contains("Catalog error") => - { - break + is_create_table_as: false, + } + | SqlCmd::CreateMaterializedView { .. } + if i != 0 + && e.to_string().contains("exists") + && e.to_string().contains("Catalog error") => + { + break + } + SqlCmd::CreateMaterializedView { .. } + if i != 0 + && e.to_string().contains("table is in creating procedure") => + { + break + } + // allow 'not found' error when retry DROP statement + SqlCmd::Drop + if i != 0 + && e.to_string().contains("not found") + && e.to_string().contains("Catalog error") => + { + break + } + _ if i >= 5 => panic!("failed to run test after retry {i} times: {e}"), + _ => tracing::error!("failed to run test: {e}\nretry after {delay:?}"), + } } - Err(e) if i >= 5 => panic!("failed to run test after retry {i} times: {e}"), - Err(e) => tracing::error!("failed to run test: {e}\nretry after {delay:?}"), } tokio::time::sleep(delay).await; }