Fix TestBuildCancelationKillsSleep to not fail on Windows#12109
Fix TestBuildCancelationKillsSleep to not fail on Windows#12109LK4D4 merged 1 commit intomoby:masterfrom
Conversation
There was a problem hiding this comment.
If this works, you should just remove this line
There was a problem hiding this comment.
@duglin yes I just pushed to see what's happening on Windows, I'm not sure it works btw
472426a to
bfce1f4
Compare
|
test isn't racy anymore. It passed on janky with the daemonTime fix, but yet on Windows even if the order of execution is now respected it still fails with: Definitively something wrong with process killing on Windows (?) ping @jfrazelle |
bfce1f4 to
1298033
Compare
fc9c2cd to
d3fcc45
Compare
|
@runcom Hmm, error seems legit for me. You're killing events, so it exits with -1. WDYT about using until for streaming autoexit? Or you can try send |
|
@LK4D4 that's ok but why the same test goes well on janky, I just don't understand this.. Also !IsKilled(err) is failing there |
|
@runcom Maybe windows |
The idea of the test was to check in as many ways as possible that the |
There was a problem hiding this comment.
I would be interested to hear the reasoning behind removing the waitgroup. My reasoning behind having it was to ensure that if the goroutine did not close for some reason due to future modifications to the code, it would block, and goroutine leakage could be detected. I use this pattern in this manner to specify that I really want this goroutine not to last longer than the calling scope, and if it does it should be detected by someone, because the caller will block at that wait.
var wg sync.WaitGroup
defer wg.Wait()
wg.Add(1)
go func() {
defer wg.Done()
...
}()There was a problem hiding this comment.
Haven't thought about that, I thought was to better synchronize the goroutine with the external context and thought that wouldn't be needed anymore. Cool, I'll add that back then.
|
@pwaller It failing on windows, because |
a063e4e to
db734d1
Compare
|
|
b76021c to
c971e01
Compare
e7a4c08 to
033e921
Compare
033e921 to
a55c1fb
Compare
|
@LK4D4 @pwaller Since both |
a55c1fb to
816cb13
Compare
|
@runcom I think it is better to run it on windows. |
|
EDIT: seems ok now :) @LK4D4 |
816cb13 to
078e497
Compare
|
sorrrry rebase :( |
Signed-off-by: Antonio Murdaca <[email protected]>
078e497 to
d38c901
Compare
|
@jfrazelle done |
|
LGTM |
1 similar comment
|
LGTM |
…ncellation Fix TestBuildCancelationKillsSleep to not fail on Windows
Fixes: #11625
Signed-off-by: Antonio Murdaca [email protected]