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

pkg/lock: fix StoppableWaitGroup tests #9465

Merged
merged 1 commit into from Oct 21, 2019
Merged

pkg/lock: fix StoppableWaitGroup tests #9465

merged 1 commit into from Oct 21, 2019

Conversation

aanm
Copy link
Member

@aanm aanm commented Oct 21, 2019

As the WaitGroup Add function might be executed after Wait()
is called golang will return a panic.

WaitGroup is reused before previous Wait has returned

To avoid doing it so, one must Add the number of go routines that will
execute Done() before those go routines are scheduled.

Fixes: a34e501 ("use StoppableWaitGroup to make sure k8s caches were synced with datapath")
Signed-off-by: André Martins andre@cilium.io


This change is Reviewable

As the WaitGroup Add function might be executed after Wait()
is called golang will return a panic.

> WaitGroup is reused before previous Wait has returned

To avoid doing it so, one must Add the number of go routines that will
execute Done() before those go routines are scheduled.

Fixes: a34e501 ("use StoppableWaitGroup to make sure k8s caches were synced with datapath")
Signed-off-by: André Martins <andre@cilium.io>
@aanm aanm added pending-review kind/bug/CI This is a bug in the testing code. area/CI Continuous Integration testing issue or flake labels Oct 21, 2019
@aanm
Copy link
Member Author

aanm commented Oct 21, 2019

test-me-please

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.03%) to 45.551% when pulling e1b3f96 on pr/fix-swg into e4d504b on master.

@tgraf tgraf merged commit c80801e into master Oct 21, 2019
@tgraf tgraf deleted the pr/fix-swg branch October 21, 2019 14:46
@joestringer joestringer added the release-note/misc This PR makes changes that have no direct user impact. label Nov 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/CI Continuous Integration testing issue or flake kind/bug/CI This is a bug in the testing code. release-note/misc This PR makes changes that have no direct user impact.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants