Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
Signed-off-by: bufferflies <1045931706@qq.com>
  • Loading branch information
bufferflies committed Jun 19, 2023
1 parent 9fe27cf commit 25b0145
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pkg/schedule/schedulers/hot_region.go
Original file line number Diff line number Diff line change
Expand Up @@ -751,7 +751,7 @@ func (bs *balanceSolver) tryAddPendingInfluence() bool {
dstStoreID := uint64(0)
if isSplit {
region := bs.GetRegion(bs.ops[0].RegionID())
for id, _ := range region.GetStoreIDs() {
for id := range region.GetStoreIDs() {
srcStoreIDs = append(srcStoreIDs, id)
}
} else {
Expand Down
4 changes: 2 additions & 2 deletions pkg/schedule/schedulers/hot_region_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ func TestHotWriteRegionScheduleByteRateOnly(t *testing.T) {
checkHotWriteRegionScheduleByteRateOnly(re, true /* enable placement rules */)
}

func TestSplitRegionInIfRegionIsTooHot(t *testing.T) {
func TestSplitIfRegionTooHot(t *testing.T) {
re := require.New(t)
statistics.Denoising = false
cancel, _, tc, oc := prepareSchedulersTest()
Expand Down Expand Up @@ -254,7 +254,7 @@ func TestSplitRegionInIfRegionIsTooHot(t *testing.T) {
addRegionInfo(tc, statistics.Write, []testRegionInfo{
{1, []uint64{1, 2, 3}, 4 * units.MiB, 0, 0},
})
hb, err = CreateScheduler(statistics.Write.String(), oc, storage.NewStorageWithMemoryBackend(), nil)
hb, _ = CreateScheduler(statistics.Write.String(), oc, storage.NewStorageWithMemoryBackend(), nil)
ops, _ = hb.Schedule(tc, false)
re.Len(ops, 1)
re.Equal(operator.OpSplit, ops[0].Kind())
Expand Down

0 comments on commit 25b0145

Please sign in to comment.