//Verifies that concurrent goroutines never "share" instances
Verifies that concurrent goroutines never "share" instances
// Verifies that concurrent goroutines never " share " instances
func (suit *PoolTestSuite) TestNoInstanceOverlap() {
	maxTotal := 5
	numGoroutines := 100
	delay := 1
	iterations := 1000
	suit.pool.Config.MaxTotal = maxTotal
	suit.pool.Config.MaxIdle = maxTotal
	suit.pool.Config.TestOnBorrow = true
	suit.pool.Config.BlockWhenExhausted = true
	suit.pool.Config.MaxWaitMillis = int64(-1)
	runTestGoroutines(suit.T(), numGoroutines, iterations, delay, suit.pool)
	suit.Equal(0, suit.pool.GetDestroyedByBorrowValidationCount())
}
func ( suit * PoolTestSuite ) TestNoInstanceOverlap ( ) { maxTotal := 5 numGoroutines := 100 delay := 1 iterations := 1000 suit . pool . Config . MaxTotal = maxTotal suit . pool . Config . MaxIdle = maxTotal suit . pool . Config . TestOnBorrow = true suit . pool . Config . BlockWhenExhausted = true suit . pool . Config . MaxWaitMillis = int64 ( - 1 ) runTestGoroutines ( suit . T ( ) , numGoroutines , iterations , delay , suit . pool ) suit . Equal ( 0 , suit . pool . GetDestroyedByBorrowValidationCount ( ) ) }
Verifies that concurrent goroutines never "share" instances
Verifies that concurrent goroutines never " share " instances