Repository navigation
test: Fail unit tests that hang for over 4 minutes - #26
Merged
Merged
Conversation
Unit test runs occasionally hang and sit for about five hours until GitHub cancels the job, which discards the log and leaves nothing to diagnose. Configure pytest-timeout to fail any test exceeding 240 seconds. No unit test legitimately runs that long, so the limit only fires on a hang. The "thread" method is used rather than the default "signal" method because the hangs occur inside blocking C extension calls (gRPC, rclpy, launch) that SIGALRM cannot interrupt; the watchdog thread also dumps every thread's stack before terminating, which is the diagnostic currently missing. The system tests are exempt: they drive real hardware and block on interactive prompts, so elapsed time says nothing about whether they are hung. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
taughz
marked this pull request as ready for review
September 9, 2026 02:47
taughz
requested review from
jbarry-bdai,
mhidalgo-rai and
tcappellari-bdai
as code owners
September 9, 2026 02:47
tcappellari-bdai
approved these changes
Sep 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Change Overview
The unit tests apparently get hung occasionally in CI. The tests will run for 5 hours then get canceled automatically by GitHub. And then there is no log. Therefore, I am adding a timeout.
Testing Done
pre-commit run --all-filespasses.pytest test --ignore=test/system).