func (s *testLocalstoreCompactorSuite) TestStartStop(c *C) {
	defer testleak.AfterTest(c)()
	store := createMemStore(time.Now().Nanosecond())
	db := store.(*dbStore).db

	for i := 0; i < 10000; i++ {
		policy := compactPolicy{
			SafePoint:       500,
			BatchDeleteCnt:  1,
			TriggerInterval: 100 * time.Millisecond,
		}
		compactor := newLocalCompactor(policy, db)
		compactor.Start()
		compactor.Stop()
		c.Logf("Test compactor stop and start %d times", i)
	}

	err := store.Close()
	c.Assert(err, IsNil)
}
// TestStartStop is to test `Panic: sync: WaitGroup is reused before previous Wait has returned`
// in Stop function.
TestStartStop is to test `Panic: sync: WaitGroup is reused before previous Wait has returned`
in Stop function.
// TestStartStop is to test ` Panic : sync : WaitGroup is reused before previous Wait has returned ` // in Stop function .
func (s *testLocalstoreCompactorSuite) TestStartStop(c *C) {
	defer testleak.AfterTest(c)()
	store := createMemStore(time.Now().Nanosecond())
	db := store.(*dbStore).db
	for i := 0; i < 10000; i++ {
		policy := compactPolicy{
			SafePoint:       500,
			BatchDeleteCnt:  1,
			TriggerInterval: 100 * time.Millisecond,
		}
		compactor := newLocalCompactor(policy, db)
		compactor.Start()
		compactor.Stop()
		c.Logf("Test compactor stop and start %d times", i)
	}
	err := store.Close()
	c.Assert(err, IsNil)
}
func ( s * testLocalstoreCompactorSuite ) TestStartStop ( c * C ) { defer testleak . AfterTest ( c ) ( ) store := createMemStore ( time . Now ( ) . Nanosecond ( ) ) db := store . ( * dbStore ) . db for i := 0 ; i < 10000 ; i ++ { policy := compactPolicy { SafePoint : 500 , BatchDeleteCnt : 1 , TriggerInterval : 100 * time . Millisecond , } compactor := newLocalCompactor ( policy , db ) compactor . Start ( ) compactor . Stop ( ) c . Logf ( " " , i ) } err := store . Close ( ) c . Assert ( err , IsNil ) }
TestStartStop is to test `Panic: sync: WaitGroup is reused before previous Wait has returned`
in Stop function.
TestStartStop is to test ` Panic : sync : WaitGroup is reused before previous Wait has returned ` in Stop function .