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
61fee319
Commit
61fee319
authored
Jul 15, 2011
by
antirez
Browse files
test that EVALSHA is replicated as EVAL
parent
f790bd02
Changes
1
Hide whitespace changes
Inline
Side-by-side
tests/unit/scripting.tcl
View file @
61fee319
...
...
@@ -124,3 +124,27 @@ start_server {tags {"scripting"}} {
set _ $e
}
{
*execution time*
}
}
start_server
{
tags
{
"scripting repl"
}}
{
start_server
{}
{
test
{
Before the slave connects we issue an EVAL command
}
{
r eval
{
return redis.call
(
'incr','x'
)}
0
}
{
1
}
test
{
Connect a slave to the main instance
}
{
r -1 slaveof
[
srv 0 host
]
[
srv 0 port
]
after 1000
s -1 role
}
{
slave
}
test
{
Now use EVALSHA against the master
}
{
r evalsha ae3477e27be955de7e1bc9adfdca626b478d3cb2 0
}
{
2
}
after 100
test
{
If EVALSHA was replicated as EVAL the slave should be ok
}
{
r -1 get x
}
{
2
}
}
}
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