Repository navigation
fix: arm the forced exit before terminate and make heartbeat tests clock-driven - #71
Merged
Merged
Conversation
…k and arm forced exit before terminate The heartbeat tests relied on real wall-clock lease and poll intervals and flaked on a loaded runner. The watchdog now takes a monotonic clock and a poll ticker (defaults unchanged), so tests advance time and heartbeats in lockstep. PackageQuit schedules its forced exit before calling terminate(), which may not return under terminateLater.
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
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.
Two fixes from the beta.9 promotion (#68):
PackageQuitarmed its 5-second forced exit after callingterminate(). With.terminateLater, AppKit runs a modal loop andterminate()may not return, so the fallback never started. The deadline is now armed first. A new test blocksterminateand checks the forced exit still fires. CodeRabbit flagged this.ClosedLidHeartbeatTestscases failed on a loaded macOS 26 runner (run 41555986220). They used short real-time windows, so a slow runner made the heartbeat look stalled.ClosedLidWatchdognow takes an injected monotonic clock and poll ticker, and those tests advance a manual clock and fire each poll by hand. Production defaults are unchanged. The SIGSTOP test keeps real time with wider margins.The targeted suites passed 10 runs in a row with four
yesprocesses loading the CPU, andscripts/verify.shpasses.