diff --git a/pkg/scheduler/internal/queue/scheduling_queue_test.go b/pkg/scheduler/internal/queue/scheduling_queue_test.go index bb6c515ed4d..1b2a29da921 100644 --- a/pkg/scheduler/internal/queue/scheduling_queue_test.go +++ b/pkg/scheduler/internal/queue/scheduling_queue_test.go @@ -3751,7 +3751,9 @@ func Test_queuedPodInfo_gatedSetUponCreationAndUnsetUponUpdate(t *testing.T) { q := NewTestQueue(ctx, newDefaultQueueSort(), WithPreEnqueuePluginMap(m)) gatedPod := st.MakePod().SchedulingGates([]string{"hello world"}).Obj() - q.Add(logger, gatedPod) + if err := q.Add(logger, gatedPod); err != nil { + t.Error("Error calling Add") + } if !q.unschedulablePods.get(gatedPod).Gated { t.Error("expected pod to be gated") @@ -3759,7 +3761,9 @@ func Test_queuedPodInfo_gatedSetUponCreationAndUnsetUponUpdate(t *testing.T) { ungatedPod := gatedPod.DeepCopy() ungatedPod.Spec.SchedulingGates = nil - q.Update(logger, gatedPod, ungatedPod) + if err := q.Update(logger, gatedPod, ungatedPod); err != nil { + t.Error("Error calling Update") + } ungatedPodInfo, _ := q.Pop(logger) if ungatedPodInfo.Gated { diff --git a/test/integration/scheduler/queue_test.go b/test/integration/scheduler/queue_test.go index 1c48fb18310..180a69f01ca 100644 --- a/test/integration/scheduler/queue_test.go +++ b/test/integration/scheduler/queue_test.go @@ -191,7 +191,9 @@ func TestGatedPodSchedulableAfterEvent(t *testing.T) { } // delete p2, which triggers DeletePodFromCache event - cs.CoreV1().Pods(ns).Delete(ctx, "p2", metav1.DeleteOptions{}) + if err := cs.CoreV1().Pods(ns).Delete(ctx, "p2", metav1.DeleteOptions{}); err != nil { + t.Fatal("Error calling Delete on p2") + } if err := wait.PollUntilContextTimeout(ctx, 200*time.Millisecond, wait.ForeverTestTimeout, false, testutils.PodDeleted(ctx, cs, ns, "p2")); err != nil { t.Fatal("Failed to delete p2") }