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
e78c4e81
Commit
e78c4e81
authored
Feb 21, 2020
by
antirez
Browse files
Test engine: detect timeout when checking for Redis startup.
parent
c6954de3
Changes
1
Show whitespace changes
Inline
Side-by-side
tests/support/server.tcl
View file @
e78c4e81
...
...
@@ -271,9 +271,19 @@ proc start_server {options {code undefined}} {
}
# Wait for actual startup
set checkperiod 100
;
# Milliseconds
set maxiter
[
expr
{
120*1000/100
}]
;
# Wait up to 2 minutes.
while
{
!
[
info exists _pid
]}
{
regexp
{
PID:
\s
(
\d
+
)}
[
exec cat $stdout
]
_ _pid
after 100
after $checkperiod
incr maxiter -1
if
{
$maxiter
== 0
}
{
start_server_error $config_file
"No PID detected in log
$stdout
"
puts
"--- LOG CONTENT ---"
puts
[
exec cat $stdout
]
puts
"-------------------"
break
}
}
# setup properties to be able to initialize a client object
...
...
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