summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoss Brattain <ross.b.brattain@intel.com>2017-08-29 16:31:59 -0700
committerRoss Brattain <ross.b.brattain@intel.com>2017-08-30 16:41:32 +0000
commitda0f85b717bba64d4905542d74fd9b4b945647c3 (patch)
treee023b6a719c0f2197d73b8327e12f4e72b508b9c
parente9d991a22270cd78485dcc6c8f3ddbf70a62286b (diff)
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 <ross.b.brattain@intel.com>
-rw-r--r--yardstick/network_services/vnf_generic/vnf/sample_vnf.py3
1 files changed, 3 insertions, 0 deletions
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()