-
Notifications
You must be signed in to change notification settings - Fork 135
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 flaky launcher test #2758
Fix flaky launcher test #2758
Conversation
|
||
stopAfter := time.Millisecond | ||
cmd.GracefulStop(stopAfter) | ||
time.Sleep(stopAfter) |
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.
We should avoid using time.Sleep
in tests.
So how about adding <- c.stoppedCh
to before this line instead of fixing the test.
https://github.com/pipe-cd/pipe/blob/master/pkg/app/launcher/cmd/launcher/binary.go#L53
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.
That's better, thank you. Addressed by de5214b
Code coverage for golang is
|
/approve |
What this PR does / why we need it:
Suspend below flaky test
Which issue(s) this PR fixes:
Fixes #
Does this PR introduce a user-facing change?: