Merge pull request #130818 from macsko/fix_flaky_nonimatednodename_integration_test

Wait for node to appear in cache in TestUpdateNominatedNodeName integration test
This commit is contained in:
Kubernetes Prow Robot 2025-03-14 13:39:58 -07:00 committed by GitHub
commit 22ff6b4918
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -226,6 +226,11 @@ func TestUpdateNominatedNodeName(t *testing.T) {
t.Fatalf("Creating node error: %v", err) t.Fatalf("Creating node error: %v", err)
} }
// Ensure node is present in scheduler cache.
if err := testutils.WaitForNodesInCache(testCtx.Ctx, testCtx.Scheduler, 1); err != nil {
t.Fatalf("Waiting for node in cache error: %v", err)
}
// Create initial low-priority pod and wait until it's scheduled. // Create initial low-priority pod and wait until it's scheduled.
pod, err := testutils.CreatePausePod(testCtx.ClientSet, podLow) pod, err := testutils.CreatePausePod(testCtx.ClientSet, podLow)
if err != nil { if err != nil {