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
0ed3970f
Commit
0ed3970f
authored
Nov 11, 2018
by
Oran Agra
Committed by
antirez
Dec 11, 2018
Browse files
fix small test suite race conditions
parent
605dddbb
Changes
3
Hide whitespace changes
Inline
Side-by-side
tests/support/util.tcl
View file @
0ed3970f
...
...
@@ -91,6 +91,14 @@ proc wait_for_sync r {
}
}
proc wait_for_ofs_sync
{
r1 r2
}
{
wait_for_condition 50 100
{
[
status $r1 master_repl_offset
]
eq
[
status $r2 master_repl_offset
]
}
else
{
fail
"replica didn't sync in time"
}
}
# Random integer between 0 and max
(
excluded
)
.
proc randomInt
{
max
}
{
expr
{
int
(
rand
()
*$max
)}
...
...
tests/unit/memefficiency.tcl
View file @
0ed3970f
...
...
@@ -90,6 +90,7 @@ start_server {tags {"defrag"}} {
test
"Active defrag big keys"
{
r flushdb
r config resetstat
r config set save
""
;
# prevent bgsave from interfereing with save below
r config set activedefrag no
r config set active-defrag-max-scan-fields 1000
r config set active-defrag-threshold-lower 5
...
...
tests/unit/type/stream-cgroups.tcl
View file @
0ed3970f
...
...
@@ -231,6 +231,8 @@ start_server {
}
}
wait_for_ofs_sync $master $slave
# Turn slave into master
$slave slaveof no one
...
...
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