Merge pull request #18499 from wojtek-t/fix_reflector_race

Auto commit by PR queue bot
This commit is contained in:
k8s-merge-robot
2015-12-15 01:19:06 -08:00
2 changed files with 7 additions and 6 deletions

View File

@@ -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 {