Wait for node to appear in cache in TestUpdateNominatedNodeName integration test

This commit is contained in:
Maciej Skoczeń 2025-03-14 14:47:19 +00:00
parent 611abd3bcd
commit f6a35c55f2

View File

@ -226,6 +226,11 @@ func TestUpdateNominatedNodeName(t *testing.T) {
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.
pod, err := testutils.CreatePausePod(testCtx.ClientSet, podLow)
if err != nil {