fix: improve lock handling and output in tests and main function#621
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #621 +/- ##
=======================================
Coverage 80.76% 80.76%
=======================================
Files 164 164
Lines 12116 12116
=======================================
Hits 9785 9785
Misses 1836 1836
Partials 495 495
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Pull request overview
This PR refactors the lock helper test binary to return explicit exit codes and emit a consistent startup line, and adjusts lock-related tests to align with the new output and improve signal-handling robustness.
Changes:
- Refactor
lock/test/main.goto move execution intorun()(returning an exit code) and printstartedon launch. - Update
lock/lock_test.goexpected outputs and timing for the helper binary runs, and add signal-exit detection logic. - Improve shell invocation quoting for paths with spaces in the interrupt-in-shell test.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| lock/test/main.go | Extracts logic into run() and adds consistent startup output + exit code handling. |
| lock/lock_test.go | Updates helper build/run behavior, expected output strings, and interrupt-related tests. |
Comments suppressed due to low confidence (1)
lock/lock_test.go:346
- Same issue here: skipping based on
buffer.Len() == 0can mask actual failures/flakiness. Prefer a deterministic sync mechanism (wait for the helper's "started" output via a pipe/reader) and use a purely technical skip message if a skip is still required.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
No description provided.