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
258f3cd3
Commit
258f3cd3
authored
Jun 12, 2014
by
antirez
Browse files
Scripting: regression test for issue #1811.
parent
ca6b95df
Changes
1
Hide whitespace changes
Inline
Side-by-side
tests/unit/scripting.tcl
View file @
258f3cd3
...
@@ -475,5 +475,27 @@ start_server {tags {"scripting repl"}} {
...
@@ -475,5 +475,27 @@ start_server {tags {"scripting repl"}} {
fail
"Expected 1 in x, but value is '
[
r -1 get x
]
'"
fail
"Expected 1 in x, but value is '
[
r -1 get x
]
'"
}
}
}
}
test
{
Lua scripts using SELECT are replicated correctly
}
{
r eval
{
redis.call
(
"set"
,
"foo1"
,
"bar1"
)
redis.call
(
"select"
,
"10"
)
redis.call
(
"incr"
,
"x"
)
redis.call
(
"select"
,
"11"
)
redis.call
(
"incr"
,
"z"
)
}
0
r eval
{
redis.call
(
"set"
,
"foo1"
,
"bar1"
)
redis.call
(
"select"
,
"10"
)
redis.call
(
"incr"
,
"x"
)
redis.call
(
"select"
,
"11"
)
redis.call
(
"incr"
,
"z"
)
}
0
wait_for_condition 50 100
{
[
r -1 debug digest
]
eq
[
r debug digest
]
}
else
{
fail
"Master-Slave desync after Lua script using SELECT."
}
}
}
}
}
}
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