github.com/pingcap/br@v5.3.0-alpha.0.20220125034240-ec59c7b6ce30+incompatible/pkg/task/restore_test.go (about) 1 // Copyright 2020 PingCAP, Inc. Licensed under Apache-2.0. 2 3 package task 4 5 import ( 6 . "github.com/pingcap/check" 7 8 "github.com/pingcap/br/pkg/restore" 9 ) 10 11 type testRestoreSuite struct{} 12 13 var _ = Suite(&testRestoreSuite{}) 14 15 func (s *testRestoreSuite) TestRestoreConfigAdjust(c *C) { 16 cfg := &RestoreConfig{} 17 cfg.adjustRestoreConfig() 18 19 c.Assert(cfg.Config.Concurrency, Equals, uint32(defaultRestoreConcurrency)) 20 c.Assert(cfg.Config.SwitchModeInterval, Equals, defaultSwitchInterval) 21 c.Assert(cfg.MergeSmallRegionKeyCount, Equals, restore.DefaultMergeRegionKeyCount) 22 c.Assert(cfg.MergeSmallRegionSizeBytes, Equals, restore.DefaultMergeRegionSizeBytes) 23 }