Skip to content

fix: improve lock handling and output in tests and main function#621

Merged
creativeprojects merged 2 commits into
masterfrom
fucking-flaky-test-locally-only
Apr 7, 2026
Merged

fix: improve lock handling and output in tests and main function#621
creativeprojects merged 2 commits into
masterfrom
fucking-flaky-test-locally-only

Conversation

@creativeprojects
Copy link
Copy Markdown
Owner

No description provided.

Copilot AI review requested due to automatic review settings April 7, 2026 20:47
@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 (395db19) to head (fea25f2).
⚠️ Report is 1 commits behind head on master.
✅ All tests successful. No failed tests found.

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           
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.

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 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.go to move execution into run() (returning an exit code) and print started on launch.
  • Update lock/lock_test.go expected 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() == 0 can 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.

Comment thread lock/lock_test.go
Comment thread lock/lock_test.go
@creativeprojects creativeprojects merged commit 6b42080 into master Apr 7, 2026
8 checks passed
@creativeprojects creativeprojects deleted the fucking-flaky-test-locally-only branch April 7, 2026 20:54
@creativeprojects creativeprojects added this to the v0.34.0 milestone Apr 7, 2026
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