Skip to content

Commit

Permalink
remove test
Browse files Browse the repository at this point in the history
Signed-off-by: Chris Martin <chris@cmartinit.co.uk>
  • Loading branch information
d80tb7 committed Sep 2, 2024
1 parent 69242d4 commit 2533156
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 65 deletions.
24 changes: 12 additions & 12 deletions internal/scheduler/simulator/simulator.go
Original file line number Diff line number Diff line change
Expand Up @@ -276,18 +276,18 @@ func validateWorkloadSpec(workloadSpec *WorkloadSpec) error {
func (s *Simulator) setupClusters() error {
for _, pool := range s.ClusterSpec.Pools {
totalResourcesForPool := schedulerobjects.ResourceList{}
nodeDb, err := nodedb.NewNodeDb(
s.schedulingConfig.PriorityClasses,
s.schedulingConfig.IndexedResources,
s.schedulingConfig.IndexedTaints,
s.schedulingConfig.IndexedNodeLabels,
s.schedulingConfig.WellKnownNodeTypes,
s.resourceListFactory,
)
if err != nil {
return err
}
for executorGroupIndex, executorGroup := range pool.ClusterGroups {
nodeDb, err := nodedb.NewNodeDb(
s.schedulingConfig.PriorityClasses,
s.schedulingConfig.IndexedResources,
s.schedulingConfig.IndexedTaints,
s.schedulingConfig.IndexedNodeLabels,
s.schedulingConfig.WellKnownNodeTypes,
s.resourceListFactory,
)
if err != nil {
return err
}
for executorIndex, executor := range executorGroup.Clusters {
executorName := fmt.Sprintf("%s-%d-%d", pool.Name, executorGroupIndex, executorIndex)
for nodeTemplateIndex, nodeTemplate := range executor.NodeTemplates {
Expand Down Expand Up @@ -316,9 +316,9 @@ func (s *Simulator) setupClusters() error {
}
}
}
s.nodeDbByPool[pool.Name] = nodeDb
totalResourcesForPool.Add(nodeDb.TotalResources())
}
s.nodeDbByPool[pool.Name] = nodeDb
s.totalResourcesByPool[pool.Name] = totalResourcesForPool
}
return nil
Expand Down
53 changes: 0 additions & 53 deletions internal/scheduler/simulator/simulator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -164,59 +164,6 @@ func TestSimulator(t *testing.T) {
},
simulatedTimeLimit: 5 * time.Minute,
},
"Preemption cascade": {
clusterSpec: &ClusterSpec{
Name: "test",
Pools: []*Pool{
WithExecutorGroupsPool(
&Pool{Name: "Pool"},
ExecutorGroup32Cpu(1, 1),
ExecutorGroup32Cpu(1, 1),
ExecutorGroup32Cpu(1, 1),
),
},
},
workloadSpec: &WorkloadSpec{
Queues: []*Queue{
WithJobTemplatesQueue(
&Queue{Name: "B", Weight: 1},
JobTemplate32Cpu(1, "foo", testfixtures.PriorityClass0),
),
WithJobTemplatesQueue(
&Queue{Name: "C", Weight: 1},
JobTemplate32Cpu(2, "foo", testfixtures.PriorityClass0),
),
WithJobTemplatesQueue(
&Queue{Name: "A", Weight: 1},
WithMinSubmitTimeJobTemplate(
JobTemplate32Cpu(1, "foo", testfixtures.PriorityClass0),
30*time.Second,
),
),
},
},
schedulingConfig: testfixtures.TestSchedulingConfig(),
expectedEventSequences: []*armadaevents.EventSequence{
SubmitJob(1, "B", "foo"),
SubmitJob(2, "C", "foo"),
JobRunLeased(1, "B", "foo"),
JobRunLeased(1, "C", "foo"),
JobRunLeased(1, "C", "foo"),
SubmitJob(1, "A", "foo"),
JobRunPreempted(1, "B", "foo"),
JobRunLeased(1, "A", "foo"),
SubmitJob(1, "B", "foo"),
JobRunPreempted(1, "C", "foo"),
JobRunLeased(1, "B", "foo"),
SubmitJob(1, "C", "foo"),
JobSucceeded(1, "C", "foo"),
JobRunLeased(1, "C", "foo"),
JobSucceeded(1, "A", "foo"),
JobSucceeded(1, "B", "foo"),
JobSucceeded(1, "C", "foo"),
},
simulatedTimeLimit: 5 * time.Minute,
},
"No preemption cascade with unified scheduling": {
clusterSpec: &ClusterSpec{
Name: "test",
Expand Down

0 comments on commit 2533156

Please sign in to comment.