Skip to content

Commit 5af1783

Browse files
authored
Merge pull request #591 from PiotrProkop/deflake-nrt-int-tests
Increase timeout in noderesourcetopology_cache_test to deflake nrt tests.
2 parents 7ae6d3f + ff643a1 commit 5af1783

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

test/integration/noderesourcetopology_cache_test.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -543,6 +543,8 @@ func TestTopologyCachePluginWithoutUpdates(t *testing.T) {
543543
t,
544544
testCtx,
545545
scheduler.WithProfiles(cfg.Profiles...),
546+
// default value is 30 seconds, lower it to 10 to speed up tests
547+
scheduler.WithPodMaxInUnschedulablePodsDuration(10*time.Second),
546548
scheduler.WithFrameworkOutOfTreeRegistry(fwkruntime.Registry{noderesourcetopology.Name: noderesourcetopology.New}),
547549
)
548550
syncInformerFactory(testCtx)
@@ -587,7 +589,9 @@ func TestTopologyCachePluginWithoutUpdates(t *testing.T) {
587589
checkPod = podIsPending
588590
}
589591

590-
updatedPod, err := checkPod(1*time.Second, 20, cs, p.pod.Namespace, p.pod.Name)
592+
// set timeout to 50s, flushUnschedulableQLeftover is running every 30 seconds + 10 seconds for podMaxInUnschedulablePodsDuration + 10 seconds just to be sure
593+
// we need to make sure scheduler will move failed pod from Unschedulable queue to Active queue at least once
594+
updatedPod, err := checkPod(1*time.Second, 50, cs, p.pod.Namespace, p.pod.Name)
591595
if err != nil {
592596
// we need more context, but we don't want to clutter the logs
593597
t.Logf("%s: pod %s/%s to be %s, error: %v\nstatus=%s", tt.name, p.pod.Namespace, p.pod.Name, action, err, formatObject(updatedPod.Status))

0 commit comments

Comments
 (0)