mirror of
https://github.com/optim-enterprises-bv/kubernetes.git
synced 2025-11-01 02:38:12 +00:00
Merge pull request #18499 from wojtek-t/fix_reflector_race
Auto commit by PR queue bot
This commit is contained in:
2
pkg/client/cache/reflector_test.go
vendored
2
pkg/client/cache/reflector_test.go
vendored
@@ -367,7 +367,6 @@ func TestReflectorResync(t *testing.T) {
|
||||
s := NewStore(MetaNamespaceKeyFunc)
|
||||
|
||||
currentTime := time.Time{}
|
||||
now = func() time.Time { return currentTime }
|
||||
iteration := 0
|
||||
|
||||
lw := &testLW{
|
||||
@@ -396,6 +395,7 @@ func TestReflectorResync(t *testing.T) {
|
||||
}
|
||||
resyncPeriod := time.Minute
|
||||
r := NewReflector(lw, &api.Pod{}, s, resyncPeriod)
|
||||
r.now = func() time.Time { return currentTime }
|
||||
|
||||
r.ListAndWatch(util.NeverStop)
|
||||
if iteration != 2 {
|
||||
|
||||
Reference in New Issue
Block a user