Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
322ea972
Commit
322ea972
authored
Jan 09, 2011
by
antirez
Browse files
run both inmemory and diskstore tests.
parent
a5062bba
Changes
2
Hide whitespace changes
Inline
Side-by-side
tests/test_helper.tcl
View file @
322ea972
...
@@ -13,7 +13,7 @@ set ::host 127.0.0.1
...
@@ -13,7 +13,7 @@ set ::host 127.0.0.1
set ::port 16379
set ::port 16379
set ::traceleaks 0
set ::traceleaks 0
set ::valgrind 0
set ::valgrind 0
set ::verbose
1
set ::verbose
0
set ::denytags
{}
set ::denytags
{}
set ::allowtags
{}
set ::allowtags
{}
set ::external 0
;
# If
"1"
this means, we are running against external instance
set ::external 0
;
# If
"1"
this means, we are running against external instance
...
@@ -110,7 +110,6 @@ proc cleanup {} {
...
@@ -110,7 +110,6 @@ proc cleanup {} {
}
}
proc execute_everything
{}
{
proc execute_everything
{}
{
if 0
{
execute_tests
"unit/auth"
execute_tests
"unit/auth"
execute_tests
"unit/protocol"
execute_tests
"unit/protocol"
execute_tests
"unit/basic"
execute_tests
"unit/basic"
...
@@ -127,20 +126,20 @@ proc execute_everything {} {
...
@@ -127,20 +126,20 @@ proc execute_everything {} {
execute_tests
"integration/aof"
execute_tests
"integration/aof"
# execute_tests
"integration/redis-cli"
# execute_tests
"integration/redis-cli"
execute_tests
"unit/pubsub"
execute_tests
"unit/pubsub"
}
# run tests with diskstore enabled
# run tests with diskstore enabled
puts
"Running diskstore tests... this is slow, press Ctrl+C if not interested.."
set ::diskstore 1
set ::diskstore 1
lappend ::denytags nodiskstore
lappend ::denytags nodiskstore
set ::global_overrides
{
diskstore-enabled yes
}
set ::global_overrides
{
diskstore-enabled yes
}
#
execute_tests
"unit/protocol"
execute_tests
"unit/protocol"
#
execute_tests
"unit/basic"
execute_tests
"unit/basic"
#
execute_tests
"unit/type/list"
execute_tests
"unit/type/list"
#
execute_tests
"unit/type/set"
execute_tests
"unit/type/set"
#
execute_tests
"unit/type/zset"
execute_tests
"unit/type/zset"
#
execute_tests
"unit/type/hash"
execute_tests
"unit/type/hash"
#
execute_tests
"unit/sort"
execute_tests
"unit/sort"
#
execute_tests
"unit/expire"
execute_tests
"unit/expire"
execute_tests
"unit/other"
execute_tests
"unit/other"
execute_tests
"unit/cas"
execute_tests
"unit/cas"
}
}
...
...
tests/unit/other.tcl
View file @
322ea972
...
@@ -120,34 +120,36 @@ start_server {tags {"other"}} {
...
@@ -120,34 +120,36 @@ start_server {tags {"other"}} {
list $e1 $e2
list $e1 $e2
}
{
1 1
}
}
{
1 1
}
test
{
PIPELINING stresser
(
also a regression for the old epoll bug
)}
{
tags
{
protocol nodiskstore
}
{
set fd2
[
socket $::host $::port
]
test
{
PIPELINING stresser
(
also a regression for the old epoll bug
)}
{
fconfigure $fd2 -encoding binary -translation binary
set fd2
[
socket $::host $::port
]
puts -nonewline $fd2
"SELECT 9
\r\n
"
fconfigure $fd2 -encoding binary -translation binary
flush $fd2
puts -nonewline $fd2
"SELECT 9
\r\n
"
gets $fd2
flush $fd2
gets $fd2
for
{
set i 0
}
{
$i
< 100000
}
{
incr i
}
{
set q
{}
for
{
set i 0
}
{
$i
< 100000
}
{
incr i
}
{
set val
"0000
${i}
0000"
set q
{}
append q
"SET key:
$i
$val
\r\n
"
set val
"0000
${i}
0000"
puts -nonewline $fd2 $q
append q
"SET key:
$i
$val
\r\n
"
set q
{}
puts -nonewline $fd2 $q
append q
"GET key:
$i
\r\n
"
set q
{}
puts -nonewline $fd2 $q
append q
"GET key:
$i
\r\n
"
}
puts -nonewline $fd2 $q
flush $fd2
}
flush $fd2
for
{
set i 0
}
{
$i
< 100000
}
{
incr i
}
{
gets $fd2 line
for
{
set i 0
}
{
$i
< 100000
}
{
incr i
}
{
gets $fd2 count
gets $fd2 line
set count
[
string range $count 1 end
]
gets $fd2 count
set val
[
read $fd2 $count
]
set count
[
string range $count 1 end
]
read $fd2 2
set val
[
read $fd2 $count
]
}
read $fd2 2
close $fd2
}
set _ 1
close $fd2
}
{
1
}
set _ 1
}
{
1
}
}
test
{
MUTLI / EXEC basics
}
{
test
{
MUTLI / EXEC basics
}
{
r del mylist
r del mylist
...
...
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