-
Notifications
You must be signed in to change notification settings - Fork 594
chore(ci): make socket activation test more robust #4985
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
5c70f7d to
e51494b
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #4985 +/- ##
==========================================
+ Coverage 75.86% 78.05% +2.19%
==========================================
Files 470 548 +78
Lines 37301 31419 -5882
==========================================
- Hits 28299 24525 -3774
+ Misses 7071 4847 -2224
- Partials 1931 2047 +116 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
rationale: needed to use `require.EventuallyWithT` in socket activation tests
Objective: make the test more robust and reduce random failures. Increased wait time to 30 seconds.
e51494b to
daf01c8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.
| // RunAndProcessStderr runs the given command, and streams its output line-by-line to a given function until it returns false. | ||
| func (e *CLITest) RunAndProcessStderr(t *testing.T, callback func(line string) bool, args ...string) (wait func() error, kill func()) { | ||
| t.Helper() | ||
| // RunAndProcessStderr runs the given command, and streams its stderr line-by-line to stderrCAllback until it returns false. |
Copilot
AI
Nov 14, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Corrected spelling of 'stderrCAllback' to 'stderrCallback'.
| // RunAndProcessStderrAsync runs the given command, and streams its output line-by-line to a given function until it returns false. | ||
| func (e *CLITest) RunAndProcessStderrAsync(t *testing.T, callback func(line string) bool, asyncCallback func(line string), args ...string) (wait func() error, kill func()) { | ||
| t.Helper() | ||
| // RunAndProcessStderrAsync runs the given command, and streams its stderr line-by-line stderrCAllback until it returns false. |
Copilot
AI
Nov 14, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Corrected spelling of 'stderrCAllback' to 'stderrCallback'.
| t.Fatal("server did not exit in time") | ||
| } | ||
|
|
||
| require.True(t, gotExpectedErrorMessage.Load(), "expected server's stderr to contain a line along the lines of 'Too many activated sockes ...'") |
Copilot
AI
Nov 14, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Corrected spelling of 'sockes' to 'sockets'.
| require.True(t, gotExpectedErrorMessage.Load(), "expected server's stderr to contain a line along the lines of 'Too many activated sockes ...'") | |
| require.True(t, gotExpectedErrorMessage.Load(), "expected server's stderr to contain a line along the lines of 'Too many activated sockets ...'") |
- follow-up to kopia#4985
Objective: eliminate, or at least reduce, failures in unreliable test.
Primary change in: 447f3f3
Preliminary refactoring was required to change the parameter type from
*testing.Ttotesting.TBin various helpers.Ref: