Skip to content

Commit f214d8e

Browse files
committed
delete unnecessary init
1 parent 45b323d commit f214d8e

File tree

1 file changed

+2
-16
lines changed

1 file changed

+2
-16
lines changed

test/integration/scheduler_perf/scheduler_perf.go

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1497,27 +1497,13 @@ func runWorkload(tCtx ktesting.TContext, tc *testCase, w *workload, informerFact
14971497
// Everything else started by this function gets stopped before it returns.
14981498
tCtx = ktesting.WithCancel(tCtx)
14991499

1500-
var dataItems []DataItem
1501-
1502-
var collectors []testDataCollector
1503-
// This needs a separate context and wait group because
1504-
// the metrics collecting needs to be sure that the goroutines
1505-
// are stopped.
1506-
var collectorCtx ktesting.TContext
1507-
15081500
executor := WorkloadExecutor{
15091501
tCtx: tCtx,
1510-
wg: sync.WaitGroup{},
1511-
collectorCtx: collectorCtx,
1512-
collectorWG: sync.WaitGroup{},
1513-
collectors: collectors,
15141502
numPodsScheduledPerNamespace: make(map[string]int),
15151503
podInformer: podInformer,
15161504
throughputErrorMargin: throughputErrorMargin,
15171505
testCase: tc,
15181506
workload: w,
1519-
nextNodeIndex: 0,
1520-
dataItems: dataItems,
15211507
}
15221508

15231509
defer executor.wg.Wait()
@@ -1566,7 +1552,7 @@ func runWorkload(tCtx ktesting.TContext, tc *testCase, w *workload, informerFact
15661552

15671553
// Some tests have unschedulable pods. Do not add an implicit barrier at the
15681554
// end as we do not want to wait for them.
1569-
return dataItems
1555+
return executor.dataItems
15701556
}
15711557

15721558
func (e *WorkloadExecutor) runCreateNodesOp(opIndex int, op *createNodesOp) {
@@ -1715,7 +1701,7 @@ func (e *WorkloadExecutor) runDeletePodsOp(opIndex int, op *deletePodsOp) {
17151701
}
17161702
e.tCtx.Errorf("op %d: unable to delete pod %v: %v", opIndex, podsToDelete[i].Name, err)
17171703
}
1718-
case <-(e.tCtx).Done():
1704+
case <-e.tCtx.Done():
17191705
return
17201706
}
17211707
}

0 commit comments

Comments
 (0)