From 951a0fc76a8791200b8efde9b3996bfc083df0c0 Mon Sep 17 00:00:00 2001 From: Jonathan Giannuzzi Date: Sat, 9 Nov 2024 13:01:05 -0700 Subject: [PATCH] Only start the extender plugin when needed in scheduler-perf --- internal/e2e/scheduler_perf/scheduler_perf_test.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/internal/e2e/scheduler_perf/scheduler_perf_test.go b/internal/e2e/scheduler_perf/scheduler_perf_test.go index a0909542..eb242ddf 100644 --- a/internal/e2e/scheduler_perf/scheduler_perf_test.go +++ b/internal/e2e/scheduler_perf/scheduler_perf_test.go @@ -762,9 +762,11 @@ func runWorkload(ctx context.Context, b *testing.B, tc *testCase, w *workload) [ finalFunc, podInformer, client, dynClient := mustSetupScheduler(ctx, b, cfg, registory) b.Cleanup(finalFunc) - // start extender - go extender.Start() - defer extender.Shutdown() + // Start extender if needed. + if cfg != nil && len(cfg.Extenders) > 0 { + go extender.Start() + defer extender.Shutdown() + } var mu sync.Mutex var dataItems []DataItem