diff options
author | antirez <antirez@gmail.com> | 2020-04-22 11:45:34 +0200 |
---|---|---|
committer | antirez <antirez@gmail.com> | 2020-04-22 11:45:34 +0200 |
commit | 8d67211450ef71c1eac505a44958998d852cbfda (patch) | |
tree | 949dfafba17c0987e028803576d83ce38c344780 /tests/unit/tracking.tcl | |
parent | 58d61dd639382fc05a2516a45656ff83ebcb18ee (diff) | |
download | redis-8d67211450ef71c1eac505a44958998d852cbfda.tar.gz |
Tracking: test expired keys notifications.tracking-noloop
Diffstat (limited to 'tests/unit/tracking.tcl')
-rw-r--r-- | tests/unit/tracking.tcl | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/unit/tracking.tcl b/tests/unit/tracking.tcl index dc6cd671a..43bb5f864 100644 --- a/tests/unit/tracking.tcl +++ b/tests/unit/tracking.tcl @@ -94,5 +94,18 @@ start_server {tags {"tracking"}} { assert {$keys eq {otherkey1 otherkey2}} } + test {Tracking gets notification of expired keys} { + r CLIENT TRACKING off + r CLIENT TRACKING on BCAST REDIRECT $redir NOLOOP + r SET mykey myval px 1 + r SET mykeyotherkey myval ; # We should not get it + after 1000 + # Because of the internals, we know we are going to receive + # two separated notifications for the two different prefixes. + set keys1 [lsort [lindex [$rd1 read] 2]] + set keys [lsort [list {*}$keys1]] + assert {$keys eq {mykey}} + } + $rd1 close } |