Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
8d672114
Commit
8d672114
authored
Apr 22, 2020
by
antirez
Browse files
Tracking: test expired keys notifications.
parent
58d61dd6
Changes
1
Show whitespace changes
Inline
Side-by-side
tests/unit/tracking.tcl
View file @
8d672114
...
...
@@ -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
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment