Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
Signed-off-by: Justin Jung <jungjust@amazon.com>
  • Loading branch information
justinjung04 committed Jul 10, 2024
1 parent e58b288 commit 9eaf463
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
4 changes: 0 additions & 4 deletions pkg/scheduler/queue/user_queues.go
Original file line number Diff line number Diff line change
Expand Up @@ -433,17 +433,13 @@ type MockLimits struct {
MaxOutstanding int
MaxQueriersPerUserVal float64
QueryPriorityVal validation.QueryPriority
RandomMaxOutstanding bool
}

func (l MockLimits) MaxQueriersPerUser(_ string) float64 {
return l.MaxQueriersPerUserVal
}

func (l MockLimits) MaxOutstandingPerTenant(_ string) int {
if l.RandomMaxOutstanding {
return rand.Intn(100)
}
return l.MaxOutstanding
}

Expand Down
2 changes: 1 addition & 1 deletion pkg/scheduler/queue/user_queues_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,7 @@ func TestGetOrAddQueueShouldUpdateProperties(t *testing.T) {
func TestGetOrAddQueueConcurrency(t *testing.T) {
const numGoRoutines = 100
limits := MockLimits{
RandomMaxOutstanding: true,
MaxOutstanding: 50,
}
q := newUserQueues(0, 0, limits, nil)
q.addQuerierConnection("q-1")
Expand Down

0 comments on commit 9eaf463

Please sign in to comment.