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
23acf93f
Commit
23acf93f
authored
Aug 30, 2013
by
antirez
Browse files
Test: Lua stack leak regression test added.
parent
0ea9a20d
Changes
1
Hide whitespace changes
Inline
Side-by-side
tests/unit/scripting.tcl
View file @
23acf93f
...
@@ -282,6 +282,21 @@ start_server {tags {"scripting"}} {
...
@@ -282,6 +282,21 @@ start_server {tags {"scripting"}} {
assert
{
$rand2
ne $rand3
}
assert
{
$rand2
ne $rand3
}
}
}
test
{
EVAL does not leak in the Lua stack
}
{
r set x 0
# Use a non blocking client to speedup the loop.
set rd
[
redis_deferring_client
]
for
{
set j 0
}
{
$j
< 10000
}
{
incr j
}
{
$rd eval
{
return redis.call
(
"incr"
,KEYS
[
1
])}
1 x
}
for
{
set j 0
}
{
$j
< 10000
}
{
incr j
}
{
$rd read
}
assert
{[
s used_memory_lua
]
< 1024*100
}
$rd close
r get x
}
{
10000
}
test
{
EVAL processes writes from AOF in read-only slaves
}
{
test
{
EVAL processes writes from AOF in read-only slaves
}
{
r flushall
r flushall
r config set appendonly yes
r config set appendonly yes
...
...
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