Avoid to use deprecated wait.Poll in scheduler tests

Signed-off-by: kerthcet <kerthcet@gmail.com>
This commit is contained in:
kerthcet
2024-05-10 14:17:09 +08:00
parent db82fd1604
commit f5b6f79410
9 changed files with 52 additions and 57 deletions

View File

@@ -223,7 +223,7 @@ func TestReScheduling(t *testing.T) {
t.Errorf("Expected a scheduling error, but got: %v", err)
}
} else {
if err = testutils.WaitForPodUnschedulable(testCtx.ClientSet, pod); err != nil {
if err = testutils.WaitForPodUnschedulable(testCtx.Ctx, testCtx.ClientSet, pod); err != nil {
t.Errorf("Didn't expect the pod to be scheduled. error: %v", err)
}
}
@@ -244,7 +244,7 @@ func TestReScheduling(t *testing.T) {
t.Errorf("Expected a scheduling error, but got: %v", err)
}
} else {
if err = testutils.WaitForPodUnschedulable(testCtx.ClientSet, pod); err != nil {
if err = testutils.WaitForPodUnschedulable(testCtx.Ctx, testCtx.ClientSet, pod); err != nil {
t.Errorf("Didn't expect the pod to be scheduled. error: %v", err)
}
}