mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-25 11:31:44 +00:00
Add label to select short workloads in scheduler_perf tests
This commit is contained in:
parent
a2cd8aa539
commit
09fc399837
@ -110,9 +110,12 @@ make test-integration WHAT=./test/integration/scheduler_perf KUBE_TEST_ARGS=-use
|
||||
```
|
||||
|
||||
Integration testing uses the same `config/performance-config.yaml` as
|
||||
benchmarking. By default, workloads labeled as `integration-test` are executed
|
||||
as part of integration testing. `-test-scheduling-label-filter` can be used to
|
||||
change that.
|
||||
benchmarking. By default, workloads labeled as `integration-test`
|
||||
are executed as part of integration testing. `-test-scheduling-label-filter` can be used to
|
||||
change that.
|
||||
|
||||
We should make each test case with `integration-test` label very small,
|
||||
Running the integration tests as above will only execute the workloads labeled as `short`.
|
||||
`SHORT=--short=false` variable added to the command can be used to disable this filtering.
|
||||
|
||||
We should make each test case with `short` label very small,
|
||||
so that all tests with the label should take less than 5 min to complete.
|
||||
|
@ -1,10 +1,13 @@
|
||||
# The following labels are used in this file:
|
||||
# - fast: short execution time, ideally less than 30 seconds
|
||||
# - integration-test: used to select workloads that
|
||||
# run in pull-kubernetes-integration. Choosing those tests
|
||||
# run in ci-kubernetes-integration-master. Choosing those tests
|
||||
# is a tradeoff between code coverage and overall runtime.
|
||||
# We should make each test case with integration-test label very small,
|
||||
# - short: used to select workloads that
|
||||
# run in pull-kubernetes-integration.
|
||||
# We should make each test case with short label very small,
|
||||
# so that all tests with the label should take less than 5 min to complete.
|
||||
# They can be run using --short=true flag.
|
||||
# - performance: used to select workloads that run
|
||||
# in ci-benchmark-scheduler-perf. Such workloads
|
||||
# must run long enough (ideally, longer than 10 seconds)
|
||||
|
@ -18,6 +18,8 @@ package benchmark
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"k8s.io/utils/ptr"
|
||||
)
|
||||
|
||||
func TestScheduling(t *testing.T) {
|
||||
@ -29,6 +31,10 @@ func TestScheduling(t *testing.T) {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
if testing.Short() {
|
||||
testSchedulingLabelFilter = ptr.To(*testSchedulingLabelFilter + ",+short")
|
||||
}
|
||||
|
||||
for _, tc := range testCases {
|
||||
t.Run(tc.Name, func(t *testing.T) {
|
||||
for _, w := range tc.Workloads {
|
||||
|
Loading…
Reference in New Issue
Block a user