-
Notifications
You must be signed in to change notification settings - Fork 89
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
Add lock to fix flaky test #1261
Conversation
Codecov ReportAttention: Patch coverage is
@@ Coverage Diff @@
## devel #1261 +/- ##
==========================================
+ Coverage 39.80% 40.24% +0.43%
==========================================
Files 45 48 +3
Lines 9376 9995 +619
==========================================
+ Hits 3732 4022 +290
- Misses 5354 5677 +323
- Partials 290 296 +6
... and 6 files with indirect coverage changes
|
Strange, it looks like UntilWithSync is still causing a data race. 🤔 |
pkg/workceptor/workunitbase.go
Outdated
@@ -402,7 +404,9 @@ func (bwu *BaseWorkUnit) MonitorLocalStatus() { | |||
watcherErrors = make(chan error) | |||
|
|||
if bwu.watcher != nil { | |||
watcherLock.Lock() |
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.
Strange that we need this.
Have you tried using the existing status file lock?
|
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.
lgtm
Add lock to fix flaky test