From 9859d57320d306e232d50e753fd3890304e2a3ec Mon Sep 17 00:00:00 2001 From: Victor Date: Mon, 28 Oct 2024 16:08:35 +0800 Subject: [PATCH] [fix] CI fix asan check --- .github/workflows/ci.yml | 2 +- tests/swap/integration/persist.tcl | 5 ++++- tests/swap/integration/rordb.tcl | 3 +++ tests/swap/unit/bitmap.tcl | 2 ++ tests/swap/unit/ttl_compact.tcl | 6 ++++++ 5 files changed, 16 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b08c8475f5f..a1185f6317f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -110,7 +110,7 @@ jobs: run: | sudo apt-get update sudo apt-get -y install libsnappy-dev zlib1g-dev libstdc++6 - make SANTIZER=address -j8 + make SANITIZER=address -j8 - name: make test run: make test-disk diff --git a/tests/swap/integration/persist.tcl b/tests/swap/integration/persist.tcl index caf8157308b..5e5910d5044 100644 --- a/tests/swap/integration/persist.tcl +++ b/tests/swap/integration/persist.tcl @@ -130,6 +130,7 @@ start_server {tags {persist} overrides {swap-persist-enabled yes swap-dirty-subk assert_equal {1} [r bitcount mybitmap0] r config set swap-evict-step-max-subkeys $bak_evict_step } + r flushdb } start_server {tags {persist} overrides {swap-persist-enabled yes swap-dirty-subkeys-enabled yes}} { @@ -406,7 +407,7 @@ start_server {tags {persist} overrides {swap-persist-enabled yes swap-dirty-subk r config set swap-bitmap-subkey-size $bak_bitmap_subkey_size } - + r flushdb } start_server {tags {persist} overrides {swap-persist-enabled yes swap-dirty-subkeys-enabled yes}} { @@ -434,6 +435,7 @@ start_server {tags {persist} overrides {swap-persist-enabled yes swap-dirty-subk wait_key_cold r mybitmap0 r bitcount mybitmap0 } + r flushdb } start_server {tags {persist} overrides {swap-persist-enabled yes swap-dirty-subkeys-enabled yes}} { @@ -452,5 +454,6 @@ start_server {tags {persist} overrides {swap-persist-enabled yes swap-dirty-subk after 1500 assert_equal [llength [r swap rio-scan meta {}]] 0 } + r flushdb } diff --git a/tests/swap/integration/rordb.tcl b/tests/swap/integration/rordb.tcl index 00dd5083cc9..ec29d50d910 100644 --- a/tests/swap/integration/rordb.tcl +++ b/tests/swap/integration/rordb.tcl @@ -138,6 +138,9 @@ start_server {tags {"rordb replication"} overrides {}} { $master config set swap-evict-step-max-subkeys $old_swap_max_subkeys $slave config set swap-evict-step-max-subkeys $old_swap_max_subkeys + + $master flushdb + $slave flushdb } } diff --git a/tests/swap/unit/bitmap.tcl b/tests/swap/unit/bitmap.tcl index 0e48eefaa4d..fbdd17f1476 100644 --- a/tests/swap/unit/bitmap.tcl +++ b/tests/swap/unit/bitmap.tcl @@ -2206,6 +2206,8 @@ start_server {tags {"bitmap chaos test"} overrides {save ""}} { assert_equal $master_digest $slave_digest } } + $master flushdb + $slave flushdb } } } \ No newline at end of file diff --git a/tests/swap/unit/ttl_compact.tcl b/tests/swap/unit/ttl_compact.tcl index 1dd08c34ca1..7f1b2196c69 100644 --- a/tests/swap/unit/ttl_compact.tcl +++ b/tests/swap/unit/ttl_compact.tcl @@ -53,6 +53,7 @@ start_server {tags {"ttl compact 1"} set compact_times [get_info_property r Swap swap_ttl_compact times] assert_equal $compact_times 0 } + r flushdb } start_server {tags {"ttl compact 2"} @@ -87,6 +88,7 @@ start_server {tags {"ttl compact 2"} set sst_age_limit [get_info_property r Swap swap_ttl_compact sst_age_limit] assert_range $sst_age_limit 900000 1000000 } + r flushdb } start_server {tags {"ttl compact 3"} @@ -148,6 +150,7 @@ start_server {tags {"ttl compact 3"} set compact_times [get_info_property r Swap swap_ttl_compact times] assert_range $compact_times 0 3 } + r flushdb } start_server {tags {"ttl compact 4"} @@ -182,6 +185,7 @@ start_server {tags {"ttl compact 4"} set sst_age_limit [get_info_property r Swap swap_ttl_compact sst_age_limit] assert_equal $sst_age_limit 0 } + r flushdb } start_server {tags {"ttl compact 5"} @@ -224,6 +228,7 @@ start_server {tags {"ttl compact 5"} set compact_times [get_info_property r Swap swap_ttl_compact times] assert_equal $compact_times 0 } + r flushdb } start_server {tags {"master propagate expire test"} overrides {save ""}} { @@ -256,4 +261,5 @@ start_server {tags {"master propagate expire test"} overrides {save ""}} { assert_equal $sst_age_limit1 $sst_age_limit2 } } + r flushdb }