Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit d36737c

Browse filesBrowse files
authored
Merge pull request #130164 from mimowo/deflake-job-integration-test
Deflake the PodReplacementPolicyFeatureToggling Job integration test
2 parents c26c59a + f5e86df commit d36737c
Copy full SHA for d36737c

File tree

Expand file treeCollapse file tree

1 file changed

+7
-1
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+7
-1
lines changed

‎test/integration/job/job_test.go

Copy file name to clipboardExpand all lines: test/integration/job/job_test.go
+7-1Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3196,9 +3196,15 @@ func TestJobPodReplacementPolicyFeatureToggling(t *testing.T) {
31963196
Ready: ptr.To[int32](0),
31973197
Active: int(podCount),
31983198
})
3199+
cancel()
31993200
// 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)
32003207
featuregatetesting.SetFeatureGateDuringTest(t, feature.DefaultFeatureGate, features.JobPodReplacementPolicy, true)
3201-
cancel()
32023208
ctx, cancel = startJobControllerAndWaitForCaches(t, restConfig)
32033209
waitForPodsToBeActive(ctx, t, jobClient, 2, jobObj)
32043210
deletePods(ctx, t, clientSet, jobObj.Namespace)

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.