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

Possibly flaky test in controller/ #56

Closed
vaikas opened this issue Aug 30, 2018 · 3 comments
Closed

Possibly flaky test in controller/ #56

vaikas opened this issue Aug 30, 2018 · 3 comments
Labels
area/test-and-release kind/bug Categorizes issue or PR as related to a bug. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. kind/doc kind/feature

Comments

@vaikas
Copy link
Contributor

vaikas commented Aug 30, 2018

Expected Behavior

./pkg/controller tests to always pass

Actual Behavior

it failed. Then passed. Running it multiple times, saw failures. This test might be flaky.
--- FAIL: TestEnqueues (0.11s)
--- FAIL: TestEnqueues/enqueue_controller_of_resource_with_owner (0.01s)
controller_test.go:244: unexpected queue (-want +got): {[]string}:
-: []string{"bar/baz"}
+: []string(nil)

Steps to Reproduce the Problem

  1. checkout the repo
  2. run controller tests multiple times: go test ./controller/... -count 1000 2>&1 | tee /tmp/testlogs
  3. fails

Additional Info

@knative-prow-robot knative-prow-robot added area/test-and-release kind/bug Categorizes issue or PR as related to a bug. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. kind/doc kind/feature kind/good-first-issue labels Aug 30, 2018
@dprotaso
Copy link
Member

What does running tests with the race detector give you?

@vaikas
Copy link
Contributor Author

vaikas commented Aug 30, 2018 via email

@mattmoor
Copy link
Member

I suspect the problem is this sleep isn't long enough.

mattmoor added a commit to mattmoor/pkg that referenced this issue Sep 24, 2018
The rate limiting queue makes the sleep necessary.  Locally I see 0-2 failures when this is run with -count=10000.  This bumps the sleep slightly to reduce this further.

Fixes: knative#56
knative-prow-robot pushed a commit that referenced this issue Sep 24, 2018
The rate limiting queue makes the sleep necessary.  Locally I see 0-2 failures when this is run with -count=10000.  This bumps the sleep slightly to reduce this further.

Fixes: #56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/test-and-release kind/bug Categorizes issue or PR as related to a bug. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. kind/doc kind/feature
Projects
None yet
Development

No branches or pull requests

4 participants