File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
Filter options
Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
Original file line number Diff line number Diff line change @@ -3196,9 +3196,15 @@ func TestJobPodReplacementPolicyFeatureToggling(t *testing.T) {
3196
3196
Ready : ptr.To [int32 ](0 ),
3197
3197
Active : int (podCount ),
3198
3198
})
3199
+ cancel ()
3199
3200
// Disable the controller and turn feature on again.
3201
+ // However, before we re-enabling the feature gate we wait a little (1s to
3202
+ // wait for the syncJob re-queue after update + 100ms for the syncJob
3203
+ // execution itself) to make sure there is no pending syncJob which could
3204
+ // panic if the trackTerminating returned false at the start of the sync,
3205
+ // but onlyReplaceFailedPods returned true during that sync.
3206
+ time .Sleep (time .Second + sleepDurationForControllerLatency )
3200
3207
featuregatetesting .SetFeatureGateDuringTest (t , feature .DefaultFeatureGate , features .JobPodReplacementPolicy , true )
3201
- cancel ()
3202
3208
ctx , cancel = startJobControllerAndWaitForCaches (t , restConfig )
3203
3209
waitForPodsToBeActive (ctx , t , jobClient , 2 , jobObj )
3204
3210
deletePods (ctx , t , clientSet , jobObj .Namespace )
You can’t perform that action at this time.
0 commit comments