Skip to content

Commit

Permalink
Only warn about longer taking passing tests compared to previous results
Browse files Browse the repository at this point in the history
The previous approach could override a FAIL or even ERROR status to
WARN which is extremely misleading at best. This approach brings
the implementation closer to the originally desired functionality.
  • Loading branch information
pevogam committed Feb 10, 2025
1 parent 8f7614c commit 6261809
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion avocado_i2n/plugins/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,10 @@ async def run_test_node(self, node: TestNode, status_timeout: int = 10) -> bool:
logging.info(
f"Validating test duration {duration} is within usual bounds ({max_allowed})"
)
if float(duration) > 1.25 * max_allowed:
if (
test_result["status"] == "PASS"
and float(duration) > 1.25 * max_allowed
):
logging.warning(
f"Test result {uid} was obtained but test took much longer ({duration}) than usual"
)
Expand Down

0 comments on commit 6261809

Please sign in to comment.