From bd82f41be80bb0fd535069701ac4cb427e712f28 Mon Sep 17 00:00:00 2001 From: Noel Kwan Date: Thu, 2 Nov 2023 17:54:20 +0800 Subject: [PATCH] simplify background_ddl test --- .../integration_tests/recovery/background_ddl.rs | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/tests/simulation/tests/integration_tests/recovery/background_ddl.rs b/src/tests/simulation/tests/integration_tests/recovery/background_ddl.rs index 6cd7a0b5d903e..81319f6710d64 100644 --- a/src/tests/simulation/tests/integration_tests/recovery/background_ddl.rs +++ b/src/tests/simulation/tests/integration_tests/recovery/background_ddl.rs @@ -108,7 +108,6 @@ async fn test_background_mv_barrier_recovery() -> Result<()> { // Send some upstream updates. session.run(SEED_TABLE).await?; - session.run(SEED_TABLE).await?; session.flush().await?; kill_and_wait_recover(&cluster).await; @@ -116,7 +115,6 @@ async fn test_background_mv_barrier_recovery() -> Result<()> { // Send some upstream updates. session.run(SEED_TABLE).await?; - session.run(SEED_TABLE).await?; session.flush().await?; kill_cn_and_wait_recover(&cluster).await; @@ -125,10 +123,13 @@ async fn test_background_mv_barrier_recovery() -> Result<()> { // Now just wait for it to complete. session.run(WAIT).await?; - session + let t_count = session.run("SELECT COUNT(v1) FROM t").await?; + + let mv1_count = session .run("SELECT COUNT(v1) FROM mv1") - .await? - .assert_result_eq("3500"); + .await?; + + assert_eq!(t_count, mv1_count); // Make sure that if MV killed and restarted // it will not be dropped.