diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 92686e62c24..8df42758f8e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -34,7 +34,7 @@ jobs: run: | sudo apt-get update sudo apt-get -y install libsnappy-dev zlib1g-dev libstdc++6 liburing-dev libevent-dev libunwind-dev libgoogle-glog-dev - - name: unit-test + - name: test run: LD_LIBRARY_PATH=/home/runner/work/Redis-On-Rocks/Redis-On-Rocks/deps/rocksdb/_build_folly/libs/glog/lib:/home/runner/work/Redis-On-Rocks/Redis-On-Rocks/deps/rocksdb/_build_folly/libs/libevent/lib make SWAP=1 unit-test -j8 # Memory-only mode tests (without SWAP) @@ -72,7 +72,7 @@ jobs: sudo apt-get -y install libsnappy-dev zlib1g-dev libstdc++6 liburing-dev libevent-dev libunwind-dev libgoogle-glog-dev - name: make run: make SANITIZER=address -j8 - - name: make test + - name: test run: make test-asan -j8 # SWAP mode tests (with RocksDB) @@ -136,5 +136,5 @@ jobs: sudo apt-get -y install libsnappy-dev zlib1g-dev libstdc++6 liburing-dev libevent-dev libunwind-dev libgoogle-glog-dev - name: make run: make SWAP=1 SANITIZER=address -j8 - - name: make test-asan + - name: test run: LD_LIBRARY_PATH=/home/runner/work/Redis-On-Rocks/Redis-On-Rocks/deps/rocksdb/_build_folly/libs/glog/lib:/home/runner/work/Redis-On-Rocks/Redis-On-Rocks/deps/rocksdb/_build_folly/libs/libevent/lib make SWAP=1 test-asan -j8 diff --git a/tests/gtid/xsync.tcl b/tests/gtid/xsync.tcl index 77d72a323c5..25d2fde3676 100644 --- a/tests/gtid/xsync.tcl +++ b/tests/gtid/xsync.tcl @@ -62,6 +62,9 @@ start_server {tags {"xsync"} overrides {gtid-enabled yes}} { # trigger master to create repl backlog, so that M S master_repl_offset will differ $S replicaof $M_host $M_port wait_for_sync $S + if {$::swap} { + wait_done_loading $S + } $S replicaof no one for {set i 0} {$i < 100} {incr i} { diff --git a/tests/integration/replication-3.tcl b/tests/integration/replication-3.tcl index bfad745e321..348aac17ec7 100644 --- a/tests/integration/replication-3.tcl +++ b/tests/integration/replication-3.tcl @@ -72,6 +72,9 @@ start_server {tags {"repl external:skip" "memonly"}} { r set key1 5 px 10 r set key2 5 px 10 r -1 select 5 + if {$::swap} { + wait_done_loading {r -1} + } wait_for_condition 50 100 { [r -1 dbsize] == 2 && [r -1 exists key1 key2] == 0 } else { @@ -96,6 +99,9 @@ start_server {tags {"repl external:skip" "memonly"}} { r pfadd key a b c d e f g h i j k l m n o p q set strval [r get key] r -1 select 5 + if {$::swap} { + wait_done_loading {r -1} + } wait_for_condition 50 100 { [r -1 dbsize] == 1 } else { @@ -115,6 +121,9 @@ start_server {tags {"repl external:skip" "memonly"}} { r pfadd key a b c d e f g h i j k l m n o p q r pexpire key 10 r -1 select 5 + if {$::swap} { + wait_done_loading {r -1} + } wait_for_condition 50 100 { [r -1 dbsize] == 1 && [r -1 exists key] == 0 } else { diff --git a/tests/support/util.tcl b/tests/support/util.tcl index a11bb23cefe..98fec436c16 100644 --- a/tests/support/util.tcl +++ b/tests/support/util.tcl @@ -163,7 +163,7 @@ proc wait_for_ofs_sync {r1 r2} { proc wait_done_loading r { wait_for_condition 50 100 { - [catch {$r ping} e] == 0 + [catch {{*}$r ping} e] == 0 } else { fail "Loading DB is taking too much time." } diff --git a/tests/unit/functions.tcl b/tests/unit/functions.tcl index 4c4715969e2..d2c166f442b 100644 --- a/tests/unit/functions.tcl +++ b/tests/unit/functions.tcl @@ -410,6 +410,9 @@ start_server {tags {"scripting repl external:skip"}} { } else { fail "Can't turn the instance into a replica" } + if {$::swap} { + wait_done_loading {r -1} + } } test "FUNCTION - test replication to replica on rdb phase" { diff --git a/tests/unit/scripting.tcl b/tests/unit/scripting.tcl index 26f63f02e12..2ca2b7f402d 100644 --- a/tests/unit/scripting.tcl +++ b/tests/unit/scripting.tcl @@ -2172,6 +2172,9 @@ start_server {tags {"scripting"}} { # add a replica and wait for the master to recognize it's online r slaveof [srv -1 host] [srv -1 port] wait_replica_online [srv -1 client] + if {$::swap} { + wait_done_loading r + } # run a slow script that does one write, then waits for INFO to indicate # that the replica dropped, and then runs another write