Skip to content

Commit

Permalink
print errors on console for execute-test
Browse files Browse the repository at this point in the history
Signed-off-by: Chinmay Gadgil <[email protected]>
  • Loading branch information
cgchinmay committed Nov 6, 2023
1 parent 035e3bc commit 8c3c56e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions osbenchmark/worker_coordinator/worker_coordinator.py
Original file line number Diff line number Diff line change
Expand Up @@ -1690,6 +1690,7 @@ async def execute_single(runner, opensearch, params, on_error):
except KeyError as e:
logging.getLogger(__name__).exception("Cannot execute runner [%s]; most likely due to missing parameters.", str(runner))
msg = "Cannot execute [%s]. Provided parameters are: %s. Error: [%s]." % (str(runner), list(params.keys()), str(e))
console.error(msg)
raise exceptions.SystemSetupError(msg)

if not request_meta_data["success"]:
Expand All @@ -1698,7 +1699,12 @@ async def execute_single(runner, opensearch, params, on_error):
description = request_meta_data.get("error-description")
if description:
msg += ", Description: %s" % description
console.error(msg)
raise exceptions.BenchmarkAssertionError(msg)

if 'error-description' in request_meta_data:
console.error(request_meta_data["error-description"])

return total_ops, total_ops_unit, request_meta_data


Expand Down

0 comments on commit 8c3c56e

Please sign in to comment.