Fix failure(context canceled) in scheduler_perf benchmark (#114843)

* Fix failure in scheduler_perf benchmark

Signed-off-by: Kante Yin <kerthcet@gmail.com>

* Fatal when error in cleaning up nodes in scheduler perf tests

Signed-off-by: Kante Yin <kerthcet@gmail.com>

* Use derived context to better organize the codes

Signed-off-by: Kante Yin <kerthcet@gmail.com>

* Change log level to 2 in scheduler perf-test

Signed-off-by: Kante Yin <kerthcet@gmail.com>

---------

Signed-off-by: Kante Yin <kerthcet@gmail.com>
This commit is contained in:
Kante Yin
2023-01-31 08:21:00 +08:00
committed by GitHub
parent 2eb2c88b1d
commit 3d0894fabf
4 changed files with 33 additions and 33 deletions

View File

@@ -17,11 +17,18 @@ limitations under the License.
package benchmark
import (
"flag"
"testing"
"k8s.io/klog/v2/ktesting"
"k8s.io/kubernetes/test/integration/framework"
)
func TestMain(m *testing.M) {
// Run with -v=2, this is the default log level in production.
ktesting.DefaultConfig = ktesting.NewConfig(ktesting.Verbosity(2))
ktesting.DefaultConfig.AddFlags(flag.CommandLine)
flag.Parse()
framework.EtcdMain(m.Run)
}