make SERVICE_TIMEOUT variable
This allows us to set SERVICE_TIMEOUT per job to handle services which might take longer to stop / start. We'll default to 30 as a reasonably safe value. Change-Id: I306a9ddfb957a947915eecc2d3121a15909f54d3
This commit is contained in:
parent
4721bc70a9
commit
a70641034a
@ -92,6 +92,9 @@ VERIFY_RESOURCES=${VERIFY_RESOURCES:-True}
|
||||
# Set up for Javelin (default to True)
|
||||
RUN_JAVELIN=${RUN_JAVELIN:-True}
|
||||
|
||||
# How long should we wait for services to start / stop before we
|
||||
# consider it a fail. Defaults to 30 seconds.
|
||||
SERVICE_TIMEOUT=${SERVICE_TIMEOUT:-30}
|
||||
|
||||
# Local variables:
|
||||
# mode: shell-script
|
||||
|
@ -138,7 +138,7 @@ function is_service_running {
|
||||
# wait for services to stop, wait up to 10 seconds because sometimes
|
||||
# services take a while to shutdown.
|
||||
function ensure_services_stopped {
|
||||
local wait_for=10
|
||||
local wait_for=$SERVICE_TIMEOUT
|
||||
local still_running=""
|
||||
while [ $wait_for -gt 0 ]; do
|
||||
still_running=""
|
||||
@ -168,7 +168,7 @@ function ensure_services_stopped {
|
||||
|
||||
# Functions to handle service checking
|
||||
function ensure_services_started {
|
||||
local wait_for=10
|
||||
local wait_for=$SERVICE_TIMEOUT
|
||||
while [ $wait_for -gt 0 ]; do
|
||||
not_running=""
|
||||
local service=""
|
||||
|
Loading…
x
Reference in New Issue
Block a user