From 26e8e33bfe2dbeb0930651635cdba51ba02bd168 Mon Sep 17 00:00:00 2001 From: Michael Marchetti Date: Thu, 1 Nov 2018 17:12:20 +0000 Subject: [PATCH] Add additional health delay - update test_vnf to wait for ns to delete Signed-off-by: Michael Marchetti --- installers/osm_health.sh | 4 ++++ systest/testcases/vnfs/test_vnfs.py | 6 ++++++ 2 files changed, 10 insertions(+) diff --git a/installers/osm_health.sh b/installers/osm_health.sh index b8e24ada..2684af73 100755 --- a/installers/osm_health.sh +++ b/installers/osm_health.sh @@ -3,6 +3,7 @@ WAIT_TIME=180 # LCM healthcheck needs 140 senconds SERVICES_WITH_HEALTH="nbi ro zookeeper lcm" NUM_SERVICES_WITH_HEALTH=$(echo $SERVICES_WITH_HEALTH | wc -w) +WAIT_FINAL=30 while getopts "w:s:n:c:" o; do case "${o}" in @@ -26,6 +27,9 @@ time=0 step=2 while [ $time -le "$WAIT_TIME" ]; do if [ "$(docker ps | grep " ${STACK_NAME}_" | grep -i healthy | wc -l)" -ge "$NUM_SERVICES_WITH_HEALTH" ]; then + # all dockers are healthy now. + # final sleep is needed until more health checks are added to validate system is ready to handle requests + sleep $WAIT_FINAL exit 0 fi diff --git a/systest/testcases/vnfs/test_vnfs.py b/systest/testcases/vnfs/test_vnfs.py index 53f39acd..b84da44c 100644 --- a/systest/testcases/vnfs/test_vnfs.py +++ b/systest/testcases/vnfs/test_vnfs.py @@ -117,6 +117,12 @@ class TestClass(object): assert not osm.get_api().ns.delete(ns_name) + #wait for the ns to delete + try: + utils.wait_for_value( lambda: osm.get_api().ns.get(nsd_desc['name']), result=False, wait_time=60) + except: + pass + assert not osm.get_api().nsd.delete(nsd_desc['name']) for file in vnfd_file_list: -- 2.25.1