From 78e069921d27d6ee916e8a037118c4e318ea8081 Mon Sep 17 00:00:00 2001 From: liyin Date: Thu, 9 Feb 2017 17:59:09 +0800 Subject: Bug fix: yardstick result return no content JIRA:BOTTLENECK-130 this patch will fix this bug: we try to expect this error, And we try to run it again. if failed, then yardstick RestAPI or have some error. Change-Id: I9fa63da637456a16c151f4fe7c566b3f5ff0e01d Signed-off-by: liyin --- testsuites/posca/testcase_script/posca_factor_system_bandwidth.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'testsuites/posca') diff --git a/testsuites/posca/testcase_script/posca_factor_system_bandwidth.py b/testsuites/posca/testcase_script/posca_factor_system_bandwidth.py index aebfa962..488f36d5 100644 --- a/testsuites/posca/testcase_script/posca_factor_system_bandwidth.py +++ b/testsuites/posca/testcase_script/posca_factor_system_bandwidth.py @@ -42,7 +42,11 @@ def do_test(test_config, con_dic): Task_id = Runner.Send_Data(test_dict, con_dic['runner_config']) time.sleep(con_dic['test_config']['test_time']) Data_Reply = Runner.Get_Reply(con_dic['runner_config'], Task_id) - test_date = Data_Reply[con_dic['runner_config']['yardstick_testcase']][0] + try: + test_date =\ + Data_Reply[con_dic['runner_config']['yardstick_testcase']][0] + except IndexError: + test_date = do_test(test_config, con_dic) return test_date -- cgit 1.2.3-korg