From 6b4ea6845737636b4e43d514228273504ab6ff3b 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 | 2 ++ tests/swap/unit/bitmap.tcl | 1 + tests/swap/unit/ttl_compact.tcl | 6 ++++++ 5 files changed, 14 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..0a2624a9113 100644 --- a/tests/swap/integration/rordb.tcl +++ b/tests/swap/integration/rordb.tcl @@ -134,6 +134,8 @@ start_server {tags {"rordb replication"} overrides {}} { assert_equal [$slave bitcount mybitmap2] {5} assert_equal [object_meta_pure_cold_subkeys_num $slave mybitmap3] 6 + # $master flushdb + } $master config set swap-evict-step-max-subkeys $old_swap_max_subkeys diff --git a/tests/swap/unit/bitmap.tcl b/tests/swap/unit/bitmap.tcl index 0e48eefaa4d..e0e7aa00b70 100644 --- a/tests/swap/unit/bitmap.tcl +++ b/tests/swap/unit/bitmap.tcl @@ -2206,6 +2206,7 @@ start_server {tags {"bitmap chaos test"} overrides {save ""}} { assert_equal $master_digest $slave_digest } } + # $master 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 }