Skip to content
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

Merged

Conversation

vagababov
Copy link
Contributor

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

@googlebot googlebot added the cla: yes Indicates the PR's author has signed the CLA. label Sep 9, 2019
@knative-prow-robot knative-prow-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Sep 9, 2019
@knative-prow-robot knative-prow-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. area/API API objects and controllers area/networking labels Sep 9, 2019
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
@vagababov vagababov force-pushed the more-sleeps-for-the-babies branch from bb1bf43 to 9d46ba2 Compare September 9, 2019 06:11
@knative-prow-robot knative-prow-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Sep 9, 2019
@knative-metrics-robot
Copy link

The following is the coverage report on pkg/.
Say /test pull-knative-serving-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/reconciler/nscert/nscert.go Do not exist 84.7%

ctx, cancel, _, _, reconciler, watcher := newTestSetup(t)
defer func() {
cancel()
time.Sleep(3 * time.Second)
Copy link
Member

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.

Copy link
Contributor Author

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.

Copy link
Member

@mattmoor mattmoor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm
/approve

@knative-prow-robot knative-prow-robot added the lgtm Indicates that a PR is ready to be merged. label Sep 9, 2019
@knative-prow-robot
Copy link
Contributor

[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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@knative-test-reporter-robot

The following jobs failed due to test flakiness:

Test name Triggers Retries
pull-knative-serving-integration-tests pull-knative-serving-integration-tests
pull-knative-serving-integration-tests
2/3

Automatically retrying...
/test pull-knative-serving-integration-tests

@knative-prow-robot knative-prow-robot merged commit 90c94fc into knative:master Sep 9, 2019
@vagababov vagababov deleted the more-sleeps-for-the-babies branch September 20, 2019 16:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/API API objects and controllers area/networking cla: yes Indicates the PR's author has signed the CLA. lgtm Indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants