-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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 sleeps to the tests that panic in the logger. #5439
Add sleeps to the tests that panic in the logger. #5439
Conversation
Currently we have no way to knowing when the informers stop. And if that's even possible. So these are bandaids for the tests that are now failing a lot on the prow. I've verified all of them with -race -count=5 setup on my machine, but let's see how they work on Prod. I don't really want to put the sleep in the cancel() since a lot of tests don't need it. Longer term, we need to find a way to find out whether the informer stopped actually doing stuff or do something with logger so that it knows test terminated and does not pass on to t.Logf. /assign mattmoor
bb1bf43
to
9d46ba2
Compare
The following is the coverage report on pkg/.
|
ctx, cancel, _, _, reconciler, watcher := newTestSetup(t) | ||
defer func() { | ||
cancel() | ||
time.Sleep(3 * time.Second) |
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 wonder if we should make SetupFakeContextWithCancel(t)
return a cancel function with this built in for now.
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 commented on this, since not all the tests suffer from this, making all of them delayed sounds a bit harsh.
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
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: mattmoor, vagababov The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
The following jobs failed due to test flakiness:
Automatically retrying... |
Currently we have no way to knowing when the informers stop. And if that's even possible.
So these are bandaids for the tests that are now failing a lot on the prow.
I've verified all of them with -race -count=5 setup on my machine,
but let's see how they work on Prod.
Longer term, we need to find a way to find out whether the informer stopped actually doing stuff
or do something with logger so that it knows test terminated and does not pass on to t.Logf.
/assign mattmoor