From 24dcd8eaac78f6f080c3ab58d4e02a3a71d847b8 Mon Sep 17 00:00:00 2001 From: Boqin Qin Date: Mon, 14 Oct 2019 19:48:50 -0400 Subject: [PATCH] framework: Fix a goroutine leak bug in resource_usage_gatherer.go --- test/e2e/framework/resource_usage_gatherer.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/e2e/framework/resource_usage_gatherer.go b/test/e2e/framework/resource_usage_gatherer.go index f751d131a30..bbb6ce4a873 100644 --- a/test/e2e/framework/resource_usage_gatherer.go +++ b/test/e2e/framework/resource_usage_gatherer.go @@ -345,7 +345,7 @@ func (g *ContainerResourceGatherer) StartGatheringData() { func (g *ContainerResourceGatherer) StopAndSummarize(percentiles []int, constraints map[string]ResourceConstraint) (*ResourceUsageSummary, error) { close(g.stopCh) Logf("Closed stop channel. Waiting for %v workers", len(g.workers)) - finished := make(chan struct{}) + finished := make(chan struct{}, 1) go func() { g.workerWg.Wait() finished <- struct{}{}