mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-05 10:19:50 +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
|
return lw.fakeWatcher, nil
|
||||||
},
|
},
|
||||||
ListFunc: func() (runtime.Object, error) {
|
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
|
return &lw
|
||||||
|
Loading…
Reference in New Issue
Block a user