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
7a30be12
Commit
7a30be12
authored
Jul 31, 2018
by
antirez
Browse files
Minor improvements to PR #5187.
parent
7b41701e
Changes
2
Hide whitespace changes
Inline
Side-by-side
tests/integration/psync2.tcl
View file @
7a30be12
...
...
@@ -33,9 +33,8 @@ start_server {} {
set cycle 1
while
{([
clock seconds
]
-$start_time
)
< $duration
}
{
test
"PSYNC2: --- CYCLE
$cycle
---"
{
incr cycle
}
test
"PSYNC2: --- CYCLE
$cycle
---"
{}
incr cycle
# Create a random replication layout.
# Start with switching master
(
this simulates a failover
)
.
...
...
@@ -139,6 +138,11 @@ start_server {} {
}
assert
{
$sum
== 4
}
}
# Limit anyway the maximum number of cycles. This is useful when the
# test is skipped via --only option of the test suite. In that case
# we don't want to see many seconds of this test being just skipped.
if
{
$cycle
> 50
}
break
}
test
"PSYNC2: Bring the master back again for next test"
{
...
...
tests/test_helper.tcl
View file @
7a30be12
...
...
@@ -429,7 +429,7 @@ proc print_help_screen {} {
"--single <unit> Just execute the specified unit (see next option). this option can be repeated."
"--list-tests List all the available test units."
"--only <test> Just execute the specified test by test name. this option can be repeated."
"--skiptill <unit>
Skip all units until (and including) the specified one."
"--skip
-
till <unit> Skip all units until (and including) the specified one."
"--clients <num> Number of test clients (default 16)."
"--timeout <sec> Test timeout in seconds (default 10 min)."
"--force-failure Force the execution of a test that always fails."
...
...
@@ -458,8 +458,7 @@ for {set j 0} {$j < [llength $argv]} {incr j} {
set arg2
[
lindex $argv
[
expr $j+2
]]
lappend ::global_overrides $arg
lappend ::global_overrides $arg2
incr j
incr j
incr j 2
}
elseif
{
$opt
eq
{
--skipfile
}}
{
incr j
set fp
[
open $arg r
]
...
...
@@ -524,6 +523,8 @@ for {set j 0} {$j < [llength $argv]} {incr j} {
}
}
# If --skil-till option was given, we populate the list of single tests
# to run with everything *after* the specified unit.
if
{
$::skip
_till !=
""
}
{
set skipping 1
foreach t $::all_tests
{
...
...
@@ -540,6 +541,8 @@ if {$::skip_till != ""} {
}
}
# Override the list of tests with the specific tests we want to run
# in case there was some filter, that is --single or --skip-till options.
if
{[
llength $::single_tests
]
> 0
}
{
set ::all_tests $::single_tests
}
...
...
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