Skip to content

test: Fail unit tests that hang for over 4 minutes - #26

Merged
taughz merged 1 commit into
fix-dependabot-configfrom
add-test-timeouts
Sep 9, 2026
Merged

taughz merged 1 commit into
fix-dependabot-configfrom
add-test-timeouts

Conversation

@taughz

@taughz taughz commented Sep 9, 2026 •

Copy link
Copy Markdown
Collaborator

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-files passes.
  • Unit tests pass (pytest test --ignore=test/system).

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
taughz added this pull request to stack #27 September 9, 2026 02:27
@taughz taughz self-assigned this Sep 9, 2026
@taughz
taughz marked this pull request as ready for review September 9, 2026 02:47
@taughz
taughz merged commit b7bb8c9 into main Sep 9, 2026
2 checks passed
@taughz
taughz deleted the add-test-timeouts branch September 9, 2026 20:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants