Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
Signed-off-by: lhy1024 <[email protected]>
  • Loading branch information
lhy1024 committed Oct 29, 2024
1 parent aeabc52 commit 760bcce
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion pkg/schedule/checker/checker_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -521,7 +521,7 @@ func (p *PatrolRegionContext) stop() {
}

func (p *PatrolRegionContext) startPatrolRegionWorkers(c *Controller) {
for i := 0; i < c.workerCount; i++ {
for i := range c.workerCount {
p.wg.Add(1)
go func(i int) {
defer logutil.LogPanic()
Expand Down
8 changes: 4 additions & 4 deletions server/cluster/cluster_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2934,12 +2934,12 @@ func TestPatrolRegionConcurrency(t *testing.T) {
checker := co.GetCheckerController()

tc.opt.SetSplitMergeInterval(time.Duration(0))
for i := 1; i < 4; i++ {
if err := tc.addRegionStore(uint64(i), regionNum); err != nil {
for i := range 3 {
if err := tc.addRegionStore(uint64(i+1), regionNum); err != nil {
return
}
}
for i := 0; i < regionNum; i++ {
for i := range regionNum {
if err := tc.addLeaderRegion(uint64(i), 1, 2, 3); err != nil {
return
}
Expand All @@ -2955,7 +2955,7 @@ func TestPatrolRegionConcurrency(t *testing.T) {

// test patrol region concurrency with suspect regions
suspectRegions := make([]uint64, 0)
for i := 0; i < 10; i++ {
for i := range 10 {
suspectRegions = append(suspectRegions, uint64(i))
}
checker.AddPendingProcessedRegions(false, suspectRegions...)
Expand Down

0 comments on commit 760bcce

Please sign in to comment.