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
39f2ab59
Commit
39f2ab59
authored
Oct 24, 2019
by
antirez
Browse files
Modules hooks: initial Tcl test file.
parent
7cefbeaa
Changes
2
Hide whitespace changes
Inline
Side-by-side
runtest-moduleapi
View file @
39f2ab59
...
@@ -13,4 +13,4 @@ then
...
@@ -13,4 +13,4 @@ then
fi
fi
make
-C
tests/modules
&&
\
make
-C
tests/modules
&&
\
$TCLSH
tests/test_helper.tcl
--single
unit/moduleapi/commandfilter
--single
unit/moduleapi/fork
--single
unit/moduleapi/testrdb
--single
unit/moduleapi/infotest
--single
unit/moduleapi/propagate
"
${
@
}
"
$TCLSH
tests/test_helper.tcl
--single
unit/moduleapi/commandfilter
--single
unit/moduleapi/fork
--single
unit/moduleapi/testrdb
--single
unit/moduleapi/infotest
--single
unit/moduleapi/propagate
--single
unit/moduleapi/hooks
"
${
@
}
"
tests/unit/moduleapi/hooks.tcl
0 → 100644
View file @
39f2ab59
set testmodule
[
file normalize tests/modules/hooks.so
]
tags
"modules"
{
start_server
{}
{
r module load $testmodule
test
{
Test clients connection / disconnection hooks
}
{
for
{
set j 0
}
{
$j
< 2
}
{
incr j
}
{
set rd1
[
redis_deferring_client
]
$rd1 close
}
r select 0
puts
"Keys:
[
r keys *
]
"
assert
{[
r llen connected
]
> 1
}
assert
{[
r llen disconnected
]
> 1
}
}
}
}
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