From f9d00940c3a22e0f066893057fd265b9f5571b61 Mon Sep 17 00:00:00 2001 From: zhannngchen <48427519+zhannngchen@users.noreply.github.com> Date: Mon, 6 Nov 2023 22:45:13 +0800 Subject: [PATCH] [fix](regression-test) add more check to address flaky test_partial_update_with_delete_stmt (#26474) --- .../test_partial_update_with_delete_stmt.out | 3 +++ .../test_partial_update_with_delete_stmt.groovy | 10 +++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/regression-test/data/unique_with_mow_p0/partial_update/test_partial_update_with_delete_stmt.out b/regression-test/data/unique_with_mow_p0/partial_update/test_partial_update_with_delete_stmt.out index e9ecbbb3f279ac..cd105da2043132 100644 --- a/regression-test/data/unique_with_mow_p0/partial_update/test_partial_update_with_delete_stmt.out +++ b/regression-test/data/unique_with_mow_p0/partial_update/test_partial_update_with_delete_stmt.out @@ -3,6 +3,9 @@ 1 doris 1000 123 1 2 doris2 2000 223 1 +-- !select_before_delete -- +2 + -- !select_join -- 1 doris 1000 123 1 diff --git a/regression-test/suites/unique_with_mow_p0/partial_update/test_partial_update_with_delete_stmt.groovy b/regression-test/suites/unique_with_mow_p0/partial_update/test_partial_update_with_delete_stmt.groovy index c9505e93e94e77..db33ec6fe46db8 100644 --- a/regression-test/suites/unique_with_mow_p0/partial_update/test_partial_update_with_delete_stmt.groovy +++ b/regression-test/suites/unique_with_mow_p0/partial_update/test_partial_update_with_delete_stmt.groovy @@ -126,10 +126,18 @@ suite("test_primary_key_partial_update_with_delete_stmt", "p0") { sql "sync" - sql """ + qt_select_before_delete """ + select ${tableName}.id from ${tableName} inner join ${tableNameJoinA} inner join ${tableNameJoinB} on ${tableNameJoinA}.id = ${tableNameJoinB}.id + and ${tableName}.id = ${tableNameJoinA}.id + """ + + def result3 = sql """ delete from ${tableName} using ${tableNameJoinA} inner join ${tableNameJoinB} on ${tableNameJoinA}.id = ${tableNameJoinB}.id where ${tableName}.id = ${tableNameJoinA}.id """ + assertTrue(result3.size() == 1) + assertTrue(result3[0].size() == 1) + assertTrue(result3[0][0] == 1, "Query OK, 1 row affected") sql "sync"