Skip to content

Commit

Permalink
add more test
Browse files Browse the repository at this point in the history
Signed-off-by: HunDunDM <[email protected]>
  • Loading branch information
HunDunDM committed Nov 10, 2022
1 parent 465c961 commit b3716b3
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions server/cluster/coordinator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -709,6 +709,15 @@ func TestAddScheduler(t *testing.T) {
re.NoError(err)
re.NoError(co.addScheduler(gls))

hb, err := schedule.CreateScheduler(schedulers.HotRegionType, oc, storage.NewStorageWithMemoryBackend(), schedule.ConfigJSONDecoder([]byte("{}")))
re.NoError(err)
conf, err = hb.EncodeConfig()
re.NoError(err)
data = make(map[string]interface{})
re.NoError(json.Unmarshal(conf, &data))
re.Contains(data, "enable-for-tiflash")
re.Equal("true", data["enable-for-tiflash"].(string))

// Transfer all leaders to store 1.
waitOperator(re, co, 2)
region2 := tc.GetRegion(2)
Expand Down

0 comments on commit b3716b3

Please sign in to comment.