-
Notifications
You must be signed in to change notification settings - Fork 47
Fix flakey OOP log test #1744
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
Fix flakey OOP log test #1744
Conversation
Signed-off-by: Adam Cattermole <a.d.cattermole@gmail.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1744 +/- ##
==========================================
+ Coverage 74.91% 75.14% +0.22%
==========================================
Files 120 120
Lines 10287 10369 +82
==========================================
+ Hits 7707 7792 +85
- Misses 2206 2211 +5
+ Partials 374 366 -8
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
didierofrivia
left a comment
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.
much better approach! 🥇
|
Damn it isn't fixed; managed to get it to fail on the 9th run.. |
internal/extension/oop.go
Outdated
| // wait for stderr | ||
| p.monitorWg.Wait() |
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.
I think this is the problem.. I managed to reproduce:
"msg"="failed to read stderr" "error"="read |0: file already closed"
I think the cmd.Wait is closing the process and we're losing the stderr before the scanner gets scheduled/reads it
Signed-off-by: Adam Cattermole <a.d.cattermole@gmail.com>
|
Okay, if you run this you should be able to get it to reproduce the error (we use separate processes so that it makes the machine more busy): cd internal/extension && for i in {1..16}; do go test -run TestOOPExtensionForwardsLog -count=1000 -parallel=16 -failfast & done; waitI seem to be able to pretty reliably get this to error on main but haven't hit it yet with the latest changes (They're quite a bit slower to run on main because that 50ms wait is adding up across all runs) |
KevFan
left a comment
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.

Exposed waiting on the waitgroup instead of the fixed time which seems to be inconsistent/insufficient in the runners