mirror of
https://github.com/kubernetes/client-go.git
synced 2025-09-04 16:40:21 +00:00
Shared Informer Run blocks until all goroutines finish
Fixes #45454 Kubernetes-commit: d789615902ead2a112ad24fbfebe95285b87004b
This commit is contained in:
committed by
Kubernetes Publisher
parent
b5da66a5eb
commit
5f6ea627a3
2
tools/cache/reflector_test.go
vendored
2
tools/cache/reflector_test.go
vendored
@@ -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"}})
|
||||
|
Reference in New Issue
Block a user