Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
Signed-off-by: Ryan Leung <[email protected]>
  • Loading branch information
rleungx committed Dec 11, 2024
1 parent 7391955 commit 6638b8d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions server/cluster/coordinator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -819,7 +819,7 @@ func TestPersistScheduler(t *testing.T) {
re.NoError(co.removeScheduler(schedulers.BalanceLeaderName))
re.NoError(co.removeScheduler(schedulers.BalanceRegionName))
re.NoError(co.removeScheduler(schedulers.HotRegionName))
re.Len(co.schedulers, defaultCount-3)
re.Len(co.schedulers, 2)
re.NoError(co.cluster.opt.Persist(storage))
co.stop()
co.wg.Wait()
Expand Down Expand Up @@ -866,7 +866,7 @@ func TestPersistScheduler(t *testing.T) {
brs, err := schedule.CreateScheduler(schedulers.BalanceRegionType, oc, storage, schedule.ConfigSliceDecoder(schedulers.BalanceRegionType, []string{"", ""}))
re.NoError(err)
re.NoError(co.addScheduler(brs))
re.Len(co.schedulers, defaultCount)
re.Len(co.schedulers, 5)

// the scheduler option should contain 6 items
// the `hot scheduler` are disabled
Expand All @@ -885,9 +885,9 @@ func TestPersistScheduler(t *testing.T) {
co = newCoordinator(ctx, tc.RaftCluster, hbStreams)

co.run()
re.Len(co.schedulers, defaultCount-1)
re.Len(co.schedulers, 4)
re.NoError(co.removeScheduler(schedulers.EvictLeaderName))
re.Len(co.schedulers, defaultCount-2)
re.Len(co.schedulers, 3)
}

func TestDenyScheduler(t *testing.T) {
Expand Down

0 comments on commit 6638b8d

Please sign in to comment.