Make the healthcheck sleep time configurable
authorcristinapauna <cristina.pauna@enea.com>
Tue, 8 Nov 2016 13:58:41 +0000 (15:58 +0200)
committerjose.lausuch <jose.lausuch@ericsson.com>
Thu, 10 Nov 2016 17:07:12 +0000 (18:07 +0100)
The healthcheck test has a 1 min sleep that gives time to the odl
flows to get programmed. This time depends on the config, and it
was noticed that on bgpvpn scenarios on arm more than one minute
is needed for the config to be properly set.

This patch makes the waiting time configurable, so it can be
overriden it when ran on arm or on varios scenarios.

Change-Id: Iebef892137ca3926e5732c910a358c15a32b5bef
Signed-off-by: cristinapauna <cristina.pauna@enea.com>
functest/ci/config_functest.yaml
functest/opnfv_tests/OpenStack/healthcheck/healthcheck.sh

index cca4959..de01948 100644 (file)
@@ -56,6 +56,7 @@ general:
 healthcheck:
     disk_image: /home/opnfv/functest/data/cirros-0.3.4-x86_64-disk.img
     disk_format: qcow2
+    wait_time: 60
 
 vping:
     ping_timeout:   200
index 996aadc..e27cf4b 100755 (executable)
@@ -223,7 +223,8 @@ info "Testing Nova API..."
 # This delay should be removed after resolving Jira case APEX-149.
 # The purpose is to give some time to populate openflow rules
 # by SDN controller in case of odl_l2 scenario.
-sleep 60
+wait_time=$(cat ${YAML_FILE} | shyaml get-value healthcheck.wait_time 2> /dev/null || true)
+sleep ${wait_time}
 
 
 # Check if flavor exists