From 1b76131a65f32ebcfc83fa9b4b53d681e6ab25e1 Mon Sep 17 00:00:00 2001 From: DanielMartinBuckley Date: Wed, 28 Feb 2018 11:55:44 +0000 Subject: NFVi Test stops after one hour even if configured context duration is longer JIRA: YARDSTICK-1021 If the Test is to take longer than the Default Duration timer use defined test time. If not use Default Duration time Change-Id: Idacc188e199ff031310b9826238b63ed3f2ea409 Signed-off-by: Daniel Martin Buckley --- yardstick/network_services/vnf_generic/vnf/sample_vnf.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/yardstick/network_services/vnf_generic/vnf/sample_vnf.py b/yardstick/network_services/vnf_generic/vnf/sample_vnf.py index d57d7e601..8d02446c2 100644 --- a/yardstick/network_services/vnf_generic/vnf/sample_vnf.py +++ b/yardstick/network_services/vnf_generic/vnf/sample_vnf.py @@ -626,8 +626,10 @@ class ScenarioHelper(object): @property def timeout(self): - return self.options.get('timeout', DEFAULT_VNF_TIMEOUT) - + test_duration = self.scenario_cfg.get('runner', {}).get('duration', + self.options.get('timeout', DEFAULT_VNF_TIMEOUT)) + test_timeout = self.options.get('timeout', DEFAULT_VNF_TIMEOUT) + return test_duration if test_duration > test_timeout else test_timeout class SampleVNF(GenericVNF): """ Class providing file-like API for generic VNF implementation """ -- cgit 1.2.3-korg