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
6bd0d342
Commit
6bd0d342
authored
Sep 05, 2018
by
antirez
Browse files
Fix scripting tests now that we default to commands repl.
parent
7895835d
Changes
1
Hide whitespace changes
Inline
Side-by-side
tests/unit/scripting.tcl
View file @
6bd0d342
...
@@ -148,9 +148,11 @@ start_server {tags {"scripting"}} {
...
@@ -148,9 +148,11 @@ start_server {tags {"scripting"}} {
test
{
EVAL - Scripts can't run certain commands
}
{
test
{
EVAL - Scripts can't run certain commands
}
{
set e
{}
set e
{}
r debug lua-always-replicate-commands 0
catch
{
catch
{
r eval
"redis.pcall('randomkey'); return redis.pcall('set','x','ciao')"
0
r eval
"redis.pcall('randomkey'); return redis.pcall('set','x','ciao')"
0
}
e
}
e
r debug lua-always-replicate-commands 1
set e
set e
}
{
*not allowed after*
}
}
{
*not allowed after*
}
...
@@ -299,9 +301,12 @@ start_server {tags {"scripting"}} {
...
@@ -299,9 +301,12 @@ start_server {tags {"scripting"}} {
}
{
b534286061d4b9e4026607613b95c06c06015ae8 loaded
}
}
{
b534286061d4b9e4026607613b95c06c06015ae8 loaded
}
test
"In the context of Lua the output of random commands gets ordered"
{
test
"In the context of Lua the output of random commands gets ordered"
{
r debug lua-always-replicate-commands 0
r del myset
r del myset
r sadd myset a b c d e f g h i l m n o p q r s t u v z aa aaa azz
r sadd myset a b c d e f g h i l m n o p q r s t u v z aa aaa azz
r eval
{
return redis.call
(
'smembers',KEYS
[
1
])}
1 myset
set res
[
r eval
{
return redis.call
(
'smembers',KEYS
[
1
])}
1 myset
]
r debug lua-always-replicate-commands 1
set res
}
{
a aa aaa azz b c d e f g h i l m n o p q r s t u v z
}
}
{
a aa aaa azz b c d e f g h i l m n o p q r s t u v z
}
test
"SORT is normally not alpha re-ordered for the scripting engine"
{
test
"SORT is normally not alpha re-ordered for the scripting engine"
{
...
@@ -655,11 +660,13 @@ start_server {tags {"scripting repl"}} {
...
@@ -655,11 +660,13 @@ start_server {tags {"scripting repl"}} {
}
{
1
}
}
{
1
}
test
"Redis.set_repl() must be issued after replicate_commands()"
{
test
"Redis.set_repl() must be issued after replicate_commands()"
{
r debug lua-always-replicate-commands 0
catch
{
catch
{
r eval
{
r eval
{
redis.set_repl
(
redis.REPL_ALL
);
redis.set_repl
(
redis.REPL_ALL
);
}
0
}
0
}
e
}
e
r debug lua-always-replicate-commands 1
set e
set e
}
{
*only after turning on*
}
}
{
*only after turning on*
}
...
...
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