[skip ci] Add comments related to data reporting to the benchmark (#8161)

Signed-off-by: wangting0128 <ting.wang@zilliz.com>
pull/8119/head
wt 2021-09-17 18:47:59 +08:00 committed by GitHub
parent 8722aeb963
commit f5da780c89
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -94,9 +94,11 @@ def run_suite(run_type, suite, env_mode, env_params, timeout=None):
logger.error(traceback.format_exc())
logger.info(result)
if result:
# Save the result of this test as true, and save the related test value results
case_metric.update_status(status="RUN_SUCC")
case_metric.update_result(result)
else:
# The test run fails, save the related errors of the run method
case_metric.update_status(status="RUN_FAILED")
case_metric.update_message(err_message)
suite_status = False
@ -116,6 +118,7 @@ def run_suite(run_type, suite, env_mode, env_params, timeout=None):
metric.update_status(status="RUN_FAILED")
finally:
if deploy_mode:
# Save all reported data to the database
api.save(metric)
# time.sleep(10)
env.tear_down()