diff --git a/pkg/client/cache/reflector_test.go b/pkg/client/cache/reflector_test.go index 6162e8ea843..89f977c5dfc 100644 --- a/pkg/client/cache/reflector_test.go +++ b/pkg/client/cache/reflector_test.go @@ -92,8 +92,8 @@ func TestReflector_watchHandler(t *testing.T) { } } - // RV should stay 1 higher than the last id we see. - if e, a := "33", resumeRV; e != a { + // RV should send the last version we see. + if e, a := "32", resumeRV; e != a { t.Errorf("expected %v, got %v", e, a) } } @@ -102,9 +102,9 @@ func TestReflector_listAndWatch(t *testing.T) { createdFakes := make(chan *watch.FakeWatcher) // The ListFunc says that it's at revision 1. Therefore, we expect our WatchFunc - // to get called at the beginning of the watch with 1, and again with 4 when we - // inject an error at 3. - expectedRVs := []string{"1", "4"} + // to get called at the beginning of the watch with 1, and again with 3 when we + // inject an error. + expectedRVs := []string{"1", "3"} lw := &testLW{ WatchFunc: func(rv string) (watch.Interface, error) { fw := watch.NewFake() diff --git a/pkg/proxy/config/api_test.go b/pkg/proxy/config/api_test.go index 91b8e2167b7..e7944d28d37 100644 --- a/pkg/proxy/config/api_test.go +++ b/pkg/proxy/config/api_test.go @@ -66,7 +66,7 @@ func TestServices(t *testing.T) { fakeWatch.Stop() newFakeWatch.Add(&service) - if !reflect.DeepEqual(fakeClient.Actions, []client.FakeAction{{"watch-services", "1"}, {"watch-services", "3"}}) { + if !reflect.DeepEqual(fakeClient.Actions, []client.FakeAction{{"watch-services", "1"}, {"watch-services", "2"}}) { t.Errorf("expected call to watch-endpoints, got %#v", fakeClient) } } @@ -191,7 +191,7 @@ func TestEndpoints(t *testing.T) { fakeWatch.Stop() newFakeWatch.Add(&endpoint) - if !reflect.DeepEqual(fakeClient.Actions, []client.FakeAction{{"watch-endpoints", "1"}, {"watch-endpoints", "3"}}) { + if !reflect.DeepEqual(fakeClient.Actions, []client.FakeAction{{"watch-endpoints", "1"}, {"watch-endpoints", "2"}}) { t.Errorf("expected call to watch-endpoints, got %#v", fakeClient) } }