mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-19 09:52:49 +00:00
fix test error
Signed-off-by: kerthcet <kerthcet@gmail.com>
This commit is contained in:
parent
eeb6e791d9
commit
dd4fb3cd37
@ -581,10 +581,14 @@ func TestPreFilterPlugin(t *testing.T) {
|
||||
t.Errorf("Error while creating a test pod: %v", err)
|
||||
}
|
||||
|
||||
if test.reject || test.fail {
|
||||
if test.reject {
|
||||
if err = waitForPodUnschedulable(testCtx.ClientSet, pod); err != nil {
|
||||
t.Errorf("Didn't expect the pod to be scheduled. error: %v", err)
|
||||
}
|
||||
} else if test.fail {
|
||||
if err = wait.Poll(10*time.Millisecond, 30*time.Second, podSchedulingError(testCtx.ClientSet, pod.Namespace, pod.Name)); err != nil {
|
||||
t.Errorf("Expected a scheduling error, but got: %v", err)
|
||||
}
|
||||
} else {
|
||||
if err = testutils.WaitForPodToSchedule(testCtx.ClientSet, pod); err != nil {
|
||||
t.Errorf("Expected the pod to be scheduled. error: %v", err)
|
||||
|
Loading…
Reference in New Issue
Block a user