Merge pull request #26059 from wojtek-t/fix_reflector_resync

Fix reflector test
This commit is contained in:
Piotr Szczesniak 2016-05-23 12:11:26 +02:00
commit 1d17eb14c2

View File

@ -379,9 +379,9 @@ func TestReflectorResync(t *testing.T) {
}
resyncPeriod := 1 * time.Millisecond
r := NewReflector(lw, &api.Pod{}, s, resyncPeriod)
err := r.ListAndWatch(stopCh)
if err != rerr {
t.Errorf("expected exiting from err %v, got: %v", rerr, err)
if err := r.ListAndWatch(stopCh); err != nil {
// error from Resync is not propaged up to here.
t.Errorf("expected error %v", rerr, err)
}
if iteration != 2 {
t.Errorf("exactly 2 iterations were expected, got: %v", iteration)