Skip to content

Commit

Permalink
Guard reserved access with lock in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
pierDipi committed Feb 12, 2025
1 parent a228d2b commit c4206df
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/scheduler/statefulset/scheduler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -745,7 +745,9 @@ func TestStatefulsetScheduler(t *testing.T) {
t.Fatal("unexpected error", err)
}
if tc.initialReserved != nil {
s.reservedMu.Lock()
s.reserved = tc.initialReserved
s.reservedMu.Unlock()
}

// Give some time for the informer to notify the scheduler and set the number of replicas
Expand Down

0 comments on commit c4206df

Please sign in to comment.