Merge "Bug fix: yardstick result return no content"
authorYu Yang (Gabriel) <Gabriel.yuyang@huawei.com>
Mon, 13 Feb 2017 07:05:05 +0000 (07:05 +0000)
committerGerrit Code Review <gerrit@opnfv.org>
Mon, 13 Feb 2017 07:05:05 +0000 (07:05 +0000)
testsuites/posca/testcase_script/posca_factor_system_bandwidth.py

index 54e2970..4819fb4 100644 (file)
@@ -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