mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 19:56:01 +00:00
test: PriorityClass resource quota tests should not cause preemption
During a parallel test run these tests were observed to cause a preemption of another test: ``` Apr 19 16:59:06.749: INFO: At 2020-04-19 16:58:52 +0000 UTC - event for pod-init-b6fbd440-dbc2-454a-b31a-ce44266298d1: {default-scheduler } Scheduled: Successfully assigned e2e-init-container-7691/pod-init-b6fbd440-dbc2-454a-b31a-ce44266298d1 to ip-10-0-148-234.us-west-2.compute.internal Apr 19 16:59:06.750: INFO: At 2020-04-19 16:58:54 +0000 UTC - event for pod-init-b6fbd440-dbc2-454a-b31a-ce44266298d1: {default-scheduler } Preempted: Preempted by e2e-resourcequota-priorityclass-8850/testpod-pclass9 on node ip-10-0-148-234.us-west-2.compute.internal ``` These tests have no need to actually land on a node to validate resource quota and so we can set an impossible scheduling condition. Hopefully we don't have tests that too broadly check impossible scheduling conditions.
This commit is contained in:
parent
3c44e11cfa
commit
1e4e0759e8
@ -1491,6 +1491,11 @@ func newTestPodForQuota(f *framework.Framework, name string, requests v1.Resourc
|
||||
Name: name,
|
||||
},
|
||||
Spec: v1.PodSpec{
|
||||
// prevent disruption to other test workloads in parallel test runs by ensuring the quota
|
||||
// test pods don't get scheduled onto a node
|
||||
NodeSelector: map[string]string{
|
||||
"x-test.k8s.io/unsatisfiable": "not-schedulable",
|
||||
},
|
||||
Containers: []v1.Container{
|
||||
{
|
||||
Name: "pause",
|
||||
@ -1512,6 +1517,11 @@ func newTestPodForQuotaWithPriority(f *framework.Framework, name string, request
|
||||
Name: name,
|
||||
},
|
||||
Spec: v1.PodSpec{
|
||||
// prevent disruption to other test workloads in parallel test runs by ensuring the quota
|
||||
// test pods don't get scheduled onto a node
|
||||
NodeSelector: map[string]string{
|
||||
"x-test.k8s.io/unsatisfiable": "not-schedulable",
|
||||
},
|
||||
Containers: []v1.Container{
|
||||
{
|
||||
Name: "pause",
|
||||
|
Loading…
Reference in New Issue
Block a user