Merge pull request #59574 from shyamjvs/fix-scale-tests-profiling-bug

Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Fix bug with profile-gathering waitgroup in scale tests

This bug has caused panic due to:

```
I0208 14:11:52.955]   Test Panicked
I0208 14:11:52.955]   sync: negative WaitGroup counter
```

e.g failure - https://k8s-gubernator.appspot.com/build/kubernetes-jenkins/logs/ci-kubernetes-kubemark-500-gce/11818)

/cc @wojtek-t 

```release-note
NONE
```
This commit is contained in:
Kubernetes Submit Queue 2018-02-08 08:28:42 -08:00 committed by GitHub
commit 7f145e0a57
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 0 deletions

View File

@ -363,6 +363,7 @@ var _ = SIGDescribe("Density", func() {
// Stop apiserver CPU profile gatherer and gather memory allocations profile.
close(profileGathererStopCh)
wg := sync.WaitGroup{}
wg.Add(1)
framework.GatherApiserverMemoryProfile(&wg, "density")
wg.Wait()

View File

@ -104,6 +104,7 @@ var _ = SIGDescribe("Load capacity", func() {
// Stop apiserver CPU profile gatherer and gather memory allocations profile.
close(profileGathererStopCh)
wg := sync.WaitGroup{}
wg.Add(1)
framework.GatherApiserverMemoryProfile(&wg, "load")
wg.Wait()