From d381e1bd284579479d8092411bbdf9afb2ded3a1 Mon Sep 17 00:00:00 2001 From: Jonathan Innis Date: Tue, 19 Sep 2023 15:27:48 -0700 Subject: [PATCH] test: Update scheduling benchmarker to use `v1beta1` APIs (#526) --- .../provisioning/scheduling/scheduling_benchmark_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/controllers/provisioning/scheduling/scheduling_benchmark_test.go b/pkg/controllers/provisioning/scheduling/scheduling_benchmark_test.go index 1ab7374a3f..23bf772d8b 100644 --- a/pkg/controllers/provisioning/scheduling/scheduling_benchmark_test.go +++ b/pkg/controllers/provisioning/scheduling/scheduling_benchmark_test.go @@ -117,14 +117,14 @@ func benchmarkScheduler(b *testing.B, instanceCount, podCount int) { // disable logging ctx = logging.WithLogger(context.Background(), zap.NewNop().Sugar()) ctx = settings.ToContext(ctx, test.Settings()) - provisioner := test.Provisioner(test.ProvisionerOptions{Limits: map[v1.ResourceName]resource.Quantity{}}) + nodePool := test.NodePool() instanceTypes := fake.InstanceTypes(instanceCount) cloudProvider = fake.NewCloudProvider() cloudProvider.InstanceTypes = instanceTypes - scheduler := scheduling.NewScheduler(ctx, nil, []*scheduling.NodeClaimTemplate{scheduling.NewNodeClaimTemplate(nodepool.New(provisioner))}, + scheduler := scheduling.NewScheduler(ctx, nil, []*scheduling.NodeClaimTemplate{scheduling.NewNodeClaimTemplate(nodePool)}, nil, state.NewCluster(&clock.RealClock{}, nil, cloudProvider), nil, &scheduling.Topology{}, - map[nodepool.Key][]*cloudprovider.InstanceType{nodepool.Key{Name: provisioner.Name, IsProvisioner: true}: instanceTypes}, nil, + map[nodepool.Key][]*cloudprovider.InstanceType{nodepool.Key{Name: nodePool.Name, IsProvisioner: false}: instanceTypes}, nil, events.NewRecorder(&record.FakeRecorder{}), scheduling.SchedulerOptions{})