mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-30 15:05:27 +00:00
Merge pull request #9789 from mesosphere/plugin-test-race
Fix mesos plugin-test race
This commit is contained in:
commit
da02e3059a
@ -120,7 +120,11 @@ func NewMockPodsListWatch(initialPodList api.PodList) *MockPodsListWatch {
|
||||
return lw.fakeWatcher, nil
|
||||
},
|
||||
ListFunc: func() (runtime.Object, error) {
|
||||
return &lw.list, nil
|
||||
lw.lock.Lock()
|
||||
defer lw.lock.Unlock()
|
||||
|
||||
listCopy, err := api.Scheme.DeepCopy(&lw.list)
|
||||
return listCopy.(*api.PodList), err
|
||||
},
|
||||
}
|
||||
return &lw
|
||||
|
Loading…
Reference in New Issue
Block a user