Commit 32d3cbac authored by Stefan Spettel's avatar Stefan Spettel

fix(ci): Fixed sanity check timer and reduced to max 1 minute

Signed-off-by: default avatarStefan Spettel <stefan.spettel@eurecom.fr>
parent e8a16c50
......@@ -29,6 +29,9 @@ import sys
import time
from pcap_check import *
TIMEOUT_COUNT=60
TIMEOUT_SLEEP=1
logging.basicConfig(
level=logging.DEBUG,
format="[%(asctime)s] %(name)s:%(levelname)s: %(message)s"
......@@ -142,8 +145,8 @@ def deployObject(service, tag, compose_file):
# Counting the number of healthy containers
cmd = 'docker-compose -p vpp-sanity -f ./ci-' + compose_file + ' ps -a'
while (nb_healthy != expect_healthy) or (cnt > 50):
time.sleep(5)
while (nb_healthy != expect_healthy) and (cnt <= TIMEOUT_COUNT):
time.sleep(TIMEOUT_SLEEP)
cnt += 1
res = subprocess.check_output(cmd, shell=True, universal_newlines=True)
nb_healthy = 0
......@@ -156,7 +159,7 @@ def deployObject(service, tag, compose_file):
# Adding a tempo for VPP-UPF to be fully ready
if service == 'vpp-upf':
time.sleep(10)
elif cnt > 50:
elif cnt > TIMEOUT_COUNT:
logging.error('KO')
sys.exit(-1)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment