From da0f85b717bba64d4905542d74fd9b4b945647c3 Mon Sep 17 00:00:00 2001 From: Ross Brattain Date: Tue, 29 Aug 2017 16:31:59 -0700 Subject: sample_vnf: run_traffic loop, check if tg_process is alive if the tg_process crashes, this loop won't terminate unless we check tg_process.is_alive() wait 1 second before checking in case is_alive needs time to become True Change-Id: Ia0b8fd884dcfeb75ebb8e36caaf1f0b70dab079d Signed-off-by: Ross Brattain --- yardstick/network_services/vnf_generic/vnf/sample_vnf.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'yardstick/network_services/vnf_generic') diff --git a/yardstick/network_services/vnf_generic/vnf/sample_vnf.py b/yardstick/network_services/vnf_generic/vnf/sample_vnf.py index 7a756837e..d7874a1a4 100644 --- a/yardstick/network_services/vnf_generic/vnf/sample_vnf.py +++ b/yardstick/network_services/vnf_generic/vnf/sample_vnf.py @@ -966,6 +966,9 @@ class SampleVNFTrafficGen(GenericTrafficGen): # Wait for traffic process to start while self.resource_helper.client_started.value == 0: time.sleep(self.RUN_WAIT) + # what if traffic process takes a few seconds to start? + if not self._traffic_process.is_alive(): + break return self._traffic_process.is_alive() -- cgit 1.2.3-korg