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
72766462
Commit
72766462
authored
Jan 15, 2010
by
antirez
Browse files
new test added
parent
4ad37480
Changes
1
Hide whitespace changes
Inline
Side-by-side
test-redis.tcl
View file @
72766462
...
@@ -280,6 +280,27 @@ proc main {server port} {
...
@@ -280,6 +280,27 @@ proc main {server port} {
$r get foo
$r get foo
}
[
string repeat
"abcd"
1000000
]
}
[
string repeat
"abcd"
1000000
]
test
{
Very big payload random access
}
{
set err
{}
array set payload
{}
for
{
set j 0
}
{
$j
< 100
}
{
incr j
}
{
set size
[
expr 1+
[
randomInt 100000
]]
set buf
[
string repeat
"abcd"
$size
]
set payload
(
$j
)
$buf
$r set bigpayload_$j $buf
}
for
{
set j 0
}
{
$j
< 1000
}
{
incr j
}
{
set index
[
randomInt 100
]
set buf
[
$r
get bigpayload_$index
]
if
{
$buf
!= $payload
(
$index
)}
{
set err
"Values differ: I set '
$buf
' but I read back '
$buf2
'"
break
}
}
unset payload
set _ $err
}
{}
test
{
SET 10000 numeric keys and access all them in reverse order
}
{
test
{
SET 10000 numeric keys and access all them in reverse order
}
{
set err
{}
set err
{}
for
{
set x 0
}
{
$x
< 10000
}
{
incr x
}
{
for
{
set x 0
}
{
$x
< 10000
}
{
incr x
}
{
...
...
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