Merge pull request #53759 from anfernee/sched-test

Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Make scheduler integration test faster

Not to wait for 30 seconds for every negative test case. This commit
also organizes the test code to make it more readable.

It cuts the test time from 450s to 125s.

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #53302

**Special notes for your reviewer**:

**Release note**: 
```release-note
NONE
```
This commit is contained in:
Kubernetes Submit Queue
2017-10-19 16:50:58 -07:00
committed by GitHub
4 changed files with 24 additions and 13 deletions

View File

@@ -384,7 +384,7 @@ func TestUnschedulableNodes(t *testing.T) {
}
// There are no schedulable nodes - the pod shouldn't be scheduled.
err = waitForPodToSchedule(context.clientSet, myPod)
err = waitForPodToScheduleWithTimeout(context.clientSet, myPod, 2*time.Second)
if err == nil {
t.Errorf("Pod scheduled successfully on unschedulable nodes")
}