From: Yu Yang (Gabriel) Date: Mon, 13 Feb 2017 07:05:05 +0000 (+0000) Subject: Merge "Bug fix: yardstick result return no content" X-Git-Tag: danube.1.RC1~20 X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=commitdiff_plain;h=9c22cd768a161ec0eab4da24f40a4c626275c746;hp=-c;p=bottlenecks.git Merge "Bug fix: yardstick result return no content" --- 9c22cd768a161ec0eab4da24f40a4c626275c746 diff --combined testsuites/posca/testcase_script/posca_factor_system_bandwidth.py index 54e2970b,488f36d5..4819fb45 --- a/testsuites/posca/testcase_script/posca_factor_system_bandwidth.py +++ b/testsuites/posca/testcase_script/posca_factor_system_bandwidth.py @@@ -33,8 -33,8 +33,8 @@@ test_dict = } -def env_pre(): - Runner.Create_Incluxdb() +def env_pre(con_dic): + Runner.Create_Incluxdb(con_dic['runner_config']) def do_test(test_config, con_dic): @@@ -42,7 -42,11 +42,11 @@@ 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 @@@ -64,7 -68,6 +68,7 @@@ def run(con_dic) if con_dic["runner_config"]["yardstick_test_ip"] is None: con_dic["runner_config"]["yardstick_test_ip"] =\ conf_parser.ip_parser("yardstick_test_ip") + env_pre(con_dic) for test_x in data["tx_pkt_sizes"]: data_max["throughput"] = 1 bandwidth_tmp = 1