Skip to content

Commit

Permalink
increase default maximum wait-started time
Browse files Browse the repository at this point in the history
Increase the default maximum time for the yaws --wait-started option
from 6 seconds to 30 seconds. The test suite was seeing random
failures due to 6 second wait not being enough. (The option doesn't
mean it waits for 30 seconds every time, just that it will wait for a
maximum of 30 seconds for yaws with the specified id to start.)
  • Loading branch information
vinoski committed May 25, 2011
1 parent fcae3cd commit 16ede48
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions man/yaws.1
Original file line number Diff line number Diff line change
Expand Up @@ -199,9 +199,9 @@ for debug purposes into the logdir.

.TP
\fB--wait-started[=T] [--id ID] \fR
Waits at most 5 seconds for the server to start. Exits with 0 if
Waits at most 30 seconds for the server to start. Exits with 0 if
server is running, 1 otherwise. Typically useful in test scripts. The
default 5 seconds can be modified by appending \fI=T\fR to the option,
default 30 seconds can be modified by appending \fI=T\fR to the option,
where \fIT\fR is the desired number of seconds to wait for the server
to start.

Expand Down
4 changes: 2 additions & 2 deletions scripts/yaws.template
Original file line number Diff line number Diff line change
Expand Up @@ -168,13 +168,13 @@ while [ $# -gt 0 ]
daemon=" -detached ";;
--wait-started=*)
call_wait_started=`echo $arg | sed -e 's/--wait-started=//'`
num=`expr "$call_wait_started" : "([0-9]*)"`
num=`expr "$call_wait_started" : "\([0-9]*\)"`
if [ "$num" != "$call_wait_started" ]; then
echo error: argument to --wait-started is $call_wait_started, not a number
exit 1
fi;;
--wait-started)
call_wait_started=6;;
call_wait_started=30;;
-d|--debug)
debug=" -boot start_sasl -yaws debug ";;
--nodebug)
Expand Down
4 changes: 2 additions & 2 deletions src/yaws_ctl.erl
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@ actl(SID, Term) ->
{error, eacces} ->
io:format("Another user is using the yaws sid <~p>, ~n"
"You are not allowd to read the file <~s>, ~n"
"specify by <-I id> which yaws system you want "
"specify by <-I id> which yaws system you want"
" to control~n",
[SID, yaws:ctl_file(SID)]),
timer:sleep(10),
Expand All @@ -420,7 +420,7 @@ actl(SID, Term) ->
{error, Reason} ->
io:format("You failed to read the ctlfile ~s~n"
"error was: <~p>~n"
"specify by <-I id> which yaws system you want "
"specify by <-I id> which yaws system you want"
" to control~n",
[yaws:ctl_file(SID), Reason]),
timer:sleep(10),
Expand Down

0 comments on commit 16ede48

Please sign in to comment.