Skip to content

Commit

Permalink
fix module tests
Browse files Browse the repository at this point in the history
Signed-off-by: Binbin <[email protected]>
  • Loading branch information
enjoy-binbin committed Aug 15, 2024
1 parent ae492d5 commit 1d56868
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 19 deletions.
4 changes: 2 additions & 2 deletions tests/unit/moduleapi/async_rm_call.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ start_server {tags {"modules"}} {
#
# Explanation of the second multi exec block:
# {lpop l} - pop the value by our blocking command 'blpop_and_set_multiple_keys'
# {del string_foo} - lazy expiration of string_foo when 'blpop_and_set_multiple_keys' tries to write to it.
# {unlink string_foo} - lazy expiration of string_foo when 'blpop_and_set_multiple_keys' tries to write to it.
# {set string_foo 1} - the action of our blocking command 'blpop_and_set_multiple_keys'
# {set string_bar 2} - the action of our blocking command 'blpop_and_set_multiple_keys'
# {incr expired} - the post notification job, registered after string_foo got expired
Expand All @@ -398,7 +398,7 @@ start_server {tags {"modules"}} {
{lpush l a}
{multi}
{lpop l}
{del string_foo}
{unlink string_foo}
{set string_foo 1}
{set string_bar 2}
{incr expired}
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/moduleapi/cluster.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ start_cluster 2 2 [list config_lines $modules] {
# the {lpush before_deleted count_dels_{4oi}} is a post notification job registered when 'count_dels_{4oi}' was removed
assert_replication_stream $repl {
{multi}
{del count_dels_{4oi}}
{unlink count_dels_{4oi}}
{keyspace.incr_dels}
{lpush before_deleted count_dels_{4oi}}
{exec}
Expand Down
8 changes: 4 additions & 4 deletions tests/unit/moduleapi/postnotifications.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ tags "modules" {
{set x 1}
{pexpireat x *}
{multi}
{del x}
{unlink x}
{lpush before_expired x}
{incr expired}
{exec}
Expand All @@ -96,7 +96,7 @@ tags "modules" {
{set x 1}
{pexpireat x *}
{multi}
{del x}
{unlink x}
{lpush before_expired x}
{incr expired}
{exec}
Expand All @@ -122,7 +122,7 @@ tags "modules" {
{pexpireat x *}
{multi}
{set read_x 1}
{del x}
{unlink x}
{lpush before_expired x}
{incr expired}
{exec}
Expand Down Expand Up @@ -162,7 +162,7 @@ tags "modules" {
{select *}
{set x 1}
{multi}
{del x}
{unlink x}
{lpush before_evicted x}
{incr evicted}
{exec}
Expand Down
24 changes: 12 additions & 12 deletions tests/unit/moduleapi/propagate.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -112,19 +112,19 @@ tags "modules" {
{incr notifications}
{incr notifications}
{incr testkeyspace:expired}
{del asdf*}
{unlink asdf*}
{exec}
{multi}
{incr notifications}
{incr notifications}
{incr testkeyspace:expired}
{del asdf*}
{unlink asdf*}
{exec}
{multi}
{incr notifications}
{incr notifications}
{incr testkeyspace:expired}
{del asdf*}
{unlink asdf*}
{exec}
}
close_replication_stream $repl
Expand Down Expand Up @@ -211,15 +211,15 @@ tags "modules" {
{exec}
{multi}
{incr notifications}
{del asdf*}
{unlink asdf*}
{exec}
{multi}
{incr notifications}
{del asdf*}
{unlink asdf*}
{exec}
{multi}
{incr notifications}
{del asdf*}
{unlink asdf*}
{exec}
{multi}
{incr notifications}
Expand Down Expand Up @@ -257,11 +257,11 @@ tags "modules" {
{exec}
{multi}
{incr notifications}
{del timer-maxmemory-volatile-*}
{unlink timer-maxmemory-volatile-*}
{exec}
{multi}
{incr notifications}
{del timer-maxmemory-volatile-*}
{unlink timer-maxmemory-volatile-*}
{exec}
}
close_replication_stream $repl
Expand Down Expand Up @@ -588,7 +588,7 @@ tags "modules" {
assert_replication_stream $repl {
{multi}
{select *}
{del k1}
{unlink k1}
{propagate-test.incr k1}
{exec}
}
Expand Down Expand Up @@ -619,9 +619,9 @@ tags "modules" {
fail "Failed to wait for set to be replicated"
}

# Currently the `del` command comes after the notification.
# Currently the `unlink` command comes after the notification.
# When we fix spop to fire notification at the end (like all other commands),
# the `del` will come first.
# the `unlink` will come first.
assert_replication_stream $repl {
{multi}
{select *}
Expand All @@ -631,7 +631,7 @@ tags "modules" {
{multi}
{incr notifications}
{incr notifications}
{del s}
{unlink s}
{exec}
}
close_replication_stream $repl
Expand Down

0 comments on commit 1d56868

Please sign in to comment.