Skip to content

test: wait for the watchdog to stop between tests - #75

Merged
StuBehan merged 3 commits into
mainfrom
fix/join-watchdog-in-tests
Oct 27, 2026
Merged

StuBehan merged 3 commits into
mainfrom
fix/join-watchdog-in-tests

Conversation

@StuBehan

@StuBehan StuBehan commented Oct 27, 2026 •

Copy link
Copy Markdown
Collaborator

Flaked on #73's macos job. test_exits_once_the_worker_overruns_its_deadline leaves its watchdog firing every 10ms and teardown only sets the stop event, so on a slow runner the thread can wake up in the next test and call that test's _exit_wedged mock (the captured setup log said "1.1s past its deadline", which is the previous test's deadline). Fixture now joins the watchdog before the mocks come off.

Reproduced locally by putting a 50ms sleep before the exit call, fails without the join and passes with it.

Also points every test at a temp socket and pid file. A stray real _exit_wedged during a local test run deleted my live daemon's socket, so the daemon kept running but nothing could reach it and callouts just stopped.

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 2 files

Reply with feedback, questions, or to request a fix.

View guided diff | Turn on auto-fix | Re-trigger cubic

Comment thread tests/test_daemon.py Resolved
@StuBehan
StuBehan merged commit ed614e1 into main Oct 27, 2026
12 checks passed
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.

1 participant