Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
d80tb7 committed Dec 1, 2024
1 parent e1a24bf commit f34243a
Showing 1 changed file with 30 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,36 @@ func TestMarketDrivenPreemptingQueueScheduler(t *testing.T) {
},
PriorityFactorByQueue: map[string]float64{"A": 1},
},
"Two Users. Self preemption plus cross user preemption": {
SchedulingConfig: testfixtures.TestSchedulingConfig(),
Nodes: testfixtures.N32CpuNodes(1, testfixtures.TestPriorities),
Rounds: []SchedulingRound{
{
JobsByQueue: map[string][]*jobdb.Job{
"A": testfixtures.N1Cpu4GiJobsWithPrice("A", 100.0, 32),
},
ExpectedScheduledIndices: map[string][]int{
"A": testfixtures.IntRange(0, 31),
},
},
{
JobsByQueue: map[string][]*jobdb.Job{
"A": testfixtures.N1Cpu4GiJobsWithPrice("A", 102.0, 16),
"B": testfixtures.N1Cpu4GiJobsWithPrice("B", 101.0, 32),
},
ExpectedScheduledIndices: map[string][]int{
"A": testfixtures.IntRange(0, 15),
"B": testfixtures.IntRange(0, 15),
},
ExpectedPreemptedIndices: map[string]map[int][]int{
"A": {
0: testfixtures.IntRange(0, 31),
},
},
},
},
PriorityFactorByQueue: map[string]float64{"A": 1, "B": 1},
},
}
for name, tc := range tests {
t.Run(name, func(t *testing.T) {
Expand Down

0 comments on commit f34243a

Please sign in to comment.