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
30cf7be6
Commit
30cf7be6
authored
Jul 11, 2011
by
antirez
Browse files
the test runs less iterations of slow tests if no --accurate is given.
parent
524d515f
Changes
4
Hide whitespace changes
Inline
Side-by-side
tests/integration/replication-3.tcl
View file @
30cf7be6
...
@@ -6,8 +6,10 @@ start_server {tags {"repl"}} {
...
@@ -6,8 +6,10 @@ start_server {tags {"repl"}} {
s -1 role
s -1 role
}
{
slave
}
}
{
slave
}
if
{
$::accurate
}
{
set numops 50000
}
else
{
set numops 5000
}
test
{
MASTER and SLAVE consistency with expire
}
{
test
{
MASTER and SLAVE consistency with expire
}
{
createComplexDataset r
50000
useexpire
createComplexDataset r
$numops
useexpire
after 4000
;
# Make sure everything expired before taking the digest
after 4000
;
# Make sure everything expired before taking the digest
r keys *
;
# Force DEL syntesizing to slave
r keys *
;
# Force DEL syntesizing to slave
after 1000
;
# Wait another second. Now everything should be fine.
after 1000
;
# Wait another second. Now everything should be fine.
...
...
tests/unit/other.tcl
View file @
30cf7be6
...
@@ -13,10 +13,11 @@ start_server {tags {"other"}} {
...
@@ -13,10 +13,11 @@ start_server {tags {"other"}} {
}
{
OK
}
}
{
OK
}
tags
{
slow
}
{
tags
{
slow
}
{
if
{
$::accurate
}
{
set iterations 10000
}
else
{
set iterations 1000
}
foreach fuzztype
{
binary alpha compr
}
{
foreach fuzztype
{
binary alpha compr
}
{
test
"FUZZ stresser with data model
$fuzztype
"
{
test
"FUZZ stresser with data model
$fuzztype
"
{
set err 0
set err 0
for
{
set i 0
}
{
$i
<
10000
}
{
incr i
}
{
for
{
set i 0
}
{
$i
<
$iterations
}
{
incr i
}
{
set fuzz
[
randstring 0 512 $fuzztype
]
set fuzz
[
randstring 0 512 $fuzztype
]
r set foo $fuzz
r set foo $fuzz
set got
[
r get foo
]
set got
[
r get foo
]
...
@@ -48,9 +49,10 @@ start_server {tags {"other"}} {
...
@@ -48,9 +49,10 @@ start_server {tags {"other"}} {
tags
{
consistency
}
{
tags
{
consistency
}
{
if
{
!
[
catch
{
package require sha1
}]}
{
if
{
!
[
catch
{
package require sha1
}]}
{
if
{
$::accurate
}
{
set numops 10000
}
else
{
set numops 1000
}
test
{
Check consistency of different data types after a reload
}
{
test
{
Check consistency of different data types after a reload
}
{
r flushdb
r flushdb
createComplexDataset r
10000
createComplexDataset r
$numops
set dump
[
csvdump r
]
set dump
[
csvdump r
]
set sha1
[
r debug digest
]
set sha1
[
r debug digest
]
r debug reload
r debug reload
...
...
tests/unit/type/list-3.tcl
View file @
30cf7be6
...
@@ -16,7 +16,8 @@ start_server {
...
@@ -16,7 +16,8 @@ start_server {
tags
{
slow
}
{
tags
{
slow
}
{
test
{
ziplist implementation: value encoding and backlink
}
{
test
{
ziplist implementation: value encoding and backlink
}
{
for
{
set j 0
}
{
$j
< 100
}
{
incr j
}
{
if
{
$::accurate
}
{
set iterations 100
}
else
{
set iterations 10
}
for
{
set j 0
}
{
$j
< $iterations
}
{
incr j
}
{
r del l
r del l
set l
{}
set l
{}
for
{
set i 0
}
{
$i
< 200
}
{
incr i
}
{
for
{
set i 0
}
{
$i
< 200
}
{
incr i
}
{
...
@@ -58,7 +59,7 @@ start_server {
...
@@ -58,7 +59,7 @@ start_server {
}
}
}
}
assert_equal
[
llength $l
]
[
r llen l
]
assert_equal
[
llength $l
]
[
r llen l
]
for
{
set i 0
}
{
$i
<
200
}
{
incr i
}
{
for
{
set i 0
}
{
$i
<
$len
}
{
incr i
}
{
if
{[
lindex $l $i
]
ne
[
r lindex l $i
]}
{
if
{[
lindex $l $i
]
ne
[
r lindex l $i
]}
{
assert_equal
[
lindex $l $i
]
[
r lindex l $i
]
assert_equal
[
lindex $l $i
]
[
r lindex l $i
]
}
}
...
...
tests/unit/type/zset.tcl
View file @
30cf7be6
...
@@ -527,7 +527,7 @@ start_server {tags {"zset"}} {
...
@@ -527,7 +527,7 @@ start_server {tags {"zset"}} {
}
elseif
{
$encoding
==
"skiplist"
}
{
}
elseif
{
$encoding
==
"skiplist"
}
{
r config set zset-max-ziplist-entries 0
r config set zset-max-ziplist-entries 0
r config set zset-max-ziplist-value 0
r config set zset-max-ziplist-value 0
set elements 1000
if
{
$::accurate
}
{
set elements 1000
}
else
{
set elements 100
}
}
else
{
}
else
{
puts
"Unknown sorted set encoding"
puts
"Unknown sorted set encoding"
exit
exit
...
...
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