Skip to content

fix(tests): improve signal handling and error reporting in lock tests#622

Merged
creativeprojects merged 3 commits intomasterfrom
speed-up-waiting-test
Apr 7, 2026
Merged

fix(tests): improve signal handling and error reporting in lock tests#622
creativeprojects merged 3 commits intomasterfrom
speed-up-waiting-test

Conversation

@creativeprojects
Copy link
Copy Markdown
Owner

No description provided.

Copilot AI review requested due to automatic review settings April 7, 2026 21:31
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the lock-related test suite to make interrupt handling more consistent across platforms and to improve diagnostics/behavior when the helper process exits unexpectedly.

Changes:

  • Wrap TestBackupWithResticLockFailureRetried in synctest.Test to better control timing-related behavior.
  • Update the lock helper program to only handle os.Interrupt and adjust signal setup.
  • Improve lock tests’ interrupt signaling and add isSignalError to skip an “inconclusive” run when the child process appears to have been terminated by a signal.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
wrapper_test.go Uses testing/synctest to make the “lock failure retried” test less timing-sensitive.
lock/test/main.go Changes how the helper binary registers/ignores signals, focusing on os.Interrupt.
lock/lock_test.go Sends os.Interrupt instead of SIGINT and adds isSignalError to improve error handling/skip logic in flaky scenarios.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread lock/test/main.go Outdated
Comment thread lock/lock_test.go
Comment thread lock/lock_test.go
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 7, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 80.76%. Comparing base (6b42080) to head (8f1f3cf).
⚠️ Report is 1 commits behind head on master.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #622   +/-   ##
=======================================
  Coverage   80.76%   80.76%           
=======================================
  Files         164      164           
  Lines       12116    12116           
=======================================
  Hits         9785     9785           
  Misses       1836     1836           
  Partials      495      495           
Flag Coverage Δ
unittests 79.04% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@creativeprojects creativeprojects added this to the v0.34.0 milestone Apr 7, 2026
@creativeprojects creativeprojects merged commit 7a64653 into master Apr 7, 2026
8 checks passed
@creativeprojects creativeprojects deleted the speed-up-waiting-test branch April 7, 2026 21:41
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