Shared Informer Run blocks until all goroutines finish

Fixes #45454

Kubernetes-commit: d789615902ead2a112ad24fbfebe95285b87004b
This commit is contained in:
Mikhail Mazurskiy
2017-05-27 23:34:58 +10:00
committed by Kubernetes Publisher
parent b5da66a5eb
commit 5f6ea627a3
5 changed files with 33 additions and 37 deletions

View File

@@ -83,7 +83,7 @@ func TestRunUntil(t *testing.T) {
return &v1.PodList{ListMeta: metav1.ListMeta{ResourceVersion: "1"}}, nil
},
}
r.RunUntil(stopCh)
go r.Run(stopCh)
// Synchronously add a dummy pod into the watch channel so we
// know the RunUntil go routine is in the watch handler.
fw.Add(&v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "bar"}})