Function with cyclomatic complexity higher than threshold GO-R1005
Anti-pattern
Minor
2 occurrences in this check
func TestHotWriteRegionScheduleByteRateOnlyWithTiFlash has a cyclomatic complexity of 21 with "high" risk
 621	clearPendingInfluence(hb.(*hotScheduler))
 622}
 623
 624func TestHotWriteRegionScheduleByteRateOnlyWithTiFlash(t *testing.T) { 625	re := require.New(t)
 626	cancel, _, tc, oc := prepareSchedulersTest()
 627	defer cancel()
func checkHotWriteRegionScheduleByteRateOnly has a cyclomatic complexity of 18 with "high" risk
 445	operatorutil.CheckTransferPeerWithLeaderTransfer(re, ops[0], operator.OpHotRegion, 1, 2)
 446}
 447
 448func checkHotWriteRegionScheduleByteRateOnly(re *require.Assertions, enablePlacementRules bool) { 449	cancel, opt, tc, oc := prepareSchedulersTest()
 450	defer cancel()
 451	tc.SetClusterVersion(versioninfo.MinSupportedVersion(versioninfo.ConfChangeV2))