From 1318f74609fb2a74182b8018134a0fdef7f5b14d Mon Sep 17 00:00:00 2001 From: sanposhiho <44139130+sanposhiho@users.noreply.github.com> Date: Thu, 9 Sep 2021 07:34:30 +0900 Subject: [PATCH] Fix: use Fatalf and list all unused params in one error --- test/integration/scheduler_perf/scheduler_perf_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/integration/scheduler_perf/scheduler_perf_test.go b/test/integration/scheduler_perf/scheduler_perf_test.go index 181e7a5bd0d..265823ae526 100644 --- a/test/integration/scheduler_perf/scheduler_perf_test.go +++ b/test/integration/scheduler_perf/scheduler_perf_test.go @@ -816,8 +816,8 @@ func runWorkload(b *testing.B, tc *testCase, w *workload) []DataItem { // check unused params and inform users unusedParams := w.unusedParams() - for _, p := range unusedParams { - b.Logf("the parameter %s is defined on workload %s, but it is unused. Please make sure there are no typos.", p, w.Name) + if len(unusedParams) != 0 { + b.Fatalf("the parameters %v are defined on workload %s, but unused.\nPlease make sure there are no typos.", unusedParams, w.Name) } // Some tests have unschedulable pods. Do not add an implicit barrier at the