@@ -688,7 +688,7 @@ func TestWatchNotHangingOnStartupFailure(t *testing.T) {
688
688
// constantly failing lists to the underlying storage.
689
689
dummyErr := fmt .Errorf ("dummy" )
690
690
backingStorage := & dummyStorage {err : dummyErr }
691
- cacher , _ , err := newTestCacherWithoutSyncing (backingStorage , testingclock . NewFakeClock ( time . Now ()) )
691
+ cacher , _ , err := newTestCacherWithoutSyncing (backingStorage )
692
692
if err != nil {
693
693
t .Fatalf ("Couldn't create cacher: %v" , err )
694
694
}
@@ -3087,44 +3087,3 @@ func TestListIndexer(t *testing.T) {
3087
3087
})
3088
3088
}
3089
3089
}
3090
-
3091
- func TestRetryAfterForUnreadyCache (t * testing.T ) {
3092
- if ! utilfeature .DefaultFeatureGate .Enabled (features .ResilientWatchCacheInitialization ) {
3093
- t .Skipf ("the test requires %v to be enabled" , features .ResilientWatchCacheInitialization )
3094
- }
3095
- backingStorage := & dummyStorage {}
3096
- clock := testingclock .NewFakeClock (time .Now ())
3097
- cacher , _ , err := newTestCacherWithoutSyncing (backingStorage , clock )
3098
- if err != nil {
3099
- t .Fatalf ("Couldn't create cacher: %v" , err )
3100
- }
3101
- defer cacher .Stop ()
3102
- if err = cacher .ready .wait (context .Background ()); err != nil {
3103
- t .Fatalf ("Unexpected error waiting for the cache to be ready" )
3104
- }
3105
-
3106
- cacher .ready .set (false )
3107
- clock .Step (14 * time .Second )
3108
-
3109
- opts := storage.ListOptions {
3110
- ResourceVersion : "0" ,
3111
- Predicate : storage .Everything ,
3112
- }
3113
- result := & example.PodList {}
3114
- proxy := NewCacheProxy (cacher , backingStorage )
3115
- err = proxy .GetList (context .TODO (), "/pods/ns" , opts , result )
3116
-
3117
- if ! apierrors .IsTooManyRequests (err ) {
3118
- t .Fatalf ("Unexpected GetList error: %v" , err )
3119
- }
3120
- var statusError apierrors.APIStatus
3121
- if ! errors .As (err , & statusError ) {
3122
- t .Fatalf ("Unexpected error: %v, expected apierrors.APIStatus" , err )
3123
- }
3124
- if statusError .Status ().Details == nil {
3125
- t .Fatalf ("Expected to get status details, got none" )
3126
- }
3127
- if statusError .Status ().Details .RetryAfterSeconds != 2 {
3128
- t .Fatalf ("Unexpected retry after: %v" , statusError .Status ().Details .RetryAfterSeconds )
3129
- }
3130
- }
0 commit comments