Skip to content

Commit

Permalink
Synchronize the results fields after issue #5826
Browse files Browse the repository at this point in the history
The previously reported issue at

avocado-framework/avocado#5826

about inconsistency in the data fields collected for current test
results and the ones from previous json results was followed by a
pull request #5826

avocado-framework/avocado#5866

which now provides the changes needed to get rid of a local todo.
  • Loading branch information
pevogam committed Oct 4, 2024
1 parent f2ab555 commit 1ecd80c
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions avocado_i2n/plugins/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -250,14 +250,11 @@ async def run_test_node(self, node: TestNode, status_timeout: int = 10) -> bool:
)
)
if len(node.results) > 0:
# TODO: avocado's choice of result attributes is not uniform for past and current results
def get_duration(x: dict[str, str]) -> float:
return float(x.get("time_elapsed", x["time"]))

duration = get_duration(test_result)
duration = float(test_result["time_elapsed"])
max_allowed = max(
[
get_duration(r)
float(r["time_elapsed"])
for r in node.results
if r["status"] == "PASS"
],
Expand Down

0 comments on commit 1ecd80c

Please sign in to comment.