Skip to content

Commit

Permalink
Update tests/unit/expire.tcl
Browse files Browse the repository at this point in the history
Co-authored-by: Binbin <[email protected]>
Signed-off-by: Yanqi Lv <[email protected]>
  • Loading branch information
lyq2333 and enjoy-binbin authored Dec 10, 2024
1 parent 3d514d1 commit 83792d0
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions tests/unit/expire.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -834,21 +834,16 @@ start_server {tags {"expire"}} {
} {} {needs:debug}

test {import-source can be closed when import-mode is off} {
r flushall
set id [r client id]

catch {r client import-source on} err
assert_match {ERR*} $err
r config set import-mode no
assert_error "ERR Server is not in import mode" {r client import-source on}

r config set import-mode yes
assert_equal [r client import-source on] {OK}

assert_match {*flags=I*} [r client list id $id]
assert_match {*flags=I*} [r client list id [r client id]]

r config set import-mode no
assert_equal [r client import-source off] {OK}

assert_match {*flags=N*} [r client list id $id]
assert_match {*flags=N*} [r client list id [r client id]]
}

test {Import mode should forbid active expiration} {
Expand Down

0 comments on commit 83792d0

Please sign in to comment.