Skip to content

Commit

Permalink
Improve default error message when a test group times out (#471)
Browse files Browse the repository at this point in the history
  • Loading branch information
david-yz-liu authored Dec 22, 2023
1 parent 2334b2f commit 53c2ae4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ All notable changes to this project will be documented here.
- Add support for Python 3.11 and 3.12 (#467)
- Track test environment setup status and report errors when running tests if environment setup is in progress or raised an error (#468)
- Update Haskell tester to use [Stack](https://docs.haskellstack.org/en/stable/) to install dependencies (#469)
- Improve default error message when a test group times out (#470)

## [v2.3.1]
- Fix a bug that prevented test file from being copied from a zip file to another location on disk (#426)
Expand Down
6 changes: 6 additions & 0 deletions server/autotest_server/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,12 @@ def _run_test_specs(
else:
_kill_user_processes(test_username)
out, err = proc.communicate()
if err == "Killed\n": # Default message from shell
test_group_name = test_data.get("extra_info", {}).get("name", "").strip()
if test_group_name:
err = f"Tests for {test_group_name} did not complete within time limit ({timeout}s)\n"
else:
err = f"Tests did not complete within time limit ({timeout}s)\n"
timeout_expired = timeout
except Exception as e:
err += "\n\n{}".format(e)
Expand Down

0 comments on commit 53c2ae4

Please sign in to comment.