-
Notifications
You must be signed in to change notification settings - Fork 259
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
tests: add tests for wait-paths #1384
Conversation
Follow up PR to add tests for wait-paths after initial PR microsoft#1258 was merged. Signed-off-by: Maksim An <[email protected]>
b251300
to
296c002
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.
Just a couple concerns with the tests, but no major issues.
} | ||
}() | ||
|
||
if err := <-errChan; err != nil { |
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.
as a weird edge case, if app.Run()
returns nil
before the create file go routines runs, this will succeed, and then not only will any errors from os.Create
be ignored, but errChan <- err
will panic.
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.
Another edge case: app.Run()
returns an error and we close the error channel before the subroutine to create the files runs/finishes running. We may end up causing a panic by writing to a closed chan.
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.
lmk if the updated implementation works for you.
couple comments in line with Hamza's review, otherwise looks good |
Signed-off-by: Maksim An <[email protected]>
Follow up PR to add tests for wait-paths after initial PR #1258
was merged.
Signed-off-by: Maksim An [email protected]