Fix watch test to expect Expired instead of Gone

Kubernetes-commit: 57b451cfb6738fca45fc05cd50c1ff6d7240e3a7
This commit is contained in:
Joe Betz 2019-11-05 22:06:10 -08:00 committed by Kubernetes Publisher
parent 1ee386df74
commit ee483f99bc
1 changed files with 4 additions and 4 deletions

View File

@ -444,8 +444,8 @@ func TestWatch(t *testing.T) {
}
defer tooOldWatcher.Stop()
// Ensure we get a "Gone" error
expectedGoneError := errors.NewGone("").ErrStatus
verifyWatchEvent(t, tooOldWatcher, watch.Error, &expectedGoneError)
expectedResourceExpiredError := errors.NewResourceExpired("").ErrStatus
verifyWatchEvent(t, tooOldWatcher, watch.Error, &expectedResourceExpiredError)
initialWatcher, err := cacher.Watch(context.TODO(), "pods/ns/foo", fooCreated.ResourceVersion, storage.Everything)
if err != nil {
@ -668,8 +668,8 @@ func TestEmptyWatchEventCache(t *testing.T) {
t.Fatalf("Unexpected error: %v", err)
}
defer watcher.Stop()
expectedGoneError := errors.NewGone("").ErrStatus
verifyWatchEvent(t, watcher, watch.Error, &expectedGoneError)
expectedResourceExpiredError := errors.NewResourceExpired("").ErrStatus
verifyWatchEvent(t, watcher, watch.Error, &expectedResourceExpiredError)
}
{