-
Notifications
You must be signed in to change notification settings - Fork 1.2k
🏃 Run tests with race detector enabled #1012
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
🏃 Run tests with race detector enabled #1012
Conversation
573a1f3
to
808f195
Compare
/retest |
808f195
to
62032ba
Compare
62032ba
to
8599240
Compare
8599240
to
0b83c77
Compare
@@ -845,11 +850,13 @@ var _ = Describe("manger.Manager", func() { | |||
m, err := New(cfg, Options{}) | |||
Expect(err).NotTo(HaveOccurred()) | |||
startGoruntime := rt.NumGoroutine() | |||
_ = pprof.Lookup("goroutine").WriteTo(os.Stdout, 1) |
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.
The test here is apparently flaky with -race
set. I am not sure if we can fix this, but having the dump here will at least give some clues.
I am unfortunately not able to repro the issue on my computer, that's why I left this here.
/assign @vincepri |
/test pull-controller-runtime-test-master |
Okay, that failure was presumably cpu starvation:
Generally running the tests with |
We could limit the amount of parallel tests with |
Do you know how that interacts with ginkgo? |
Ah, forgot about we were using ginkgo — I'll need to look into that, we can set |
@vincepri wdyt about merging this? If we end up getting flakes we could for example use build flags to run a subset of tests without race detector |
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.
/approve
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: alvaroaleman, vincepri 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 |
Changes the test script to run with
--race
and fixes thethreefive races found (all of which are in test code)