github.com/projecteru2/core@v0.0.0-20240321043226-06bcc1c23f58/utils/gopool_test.go (about)

     1  package utils
     2  
     3  import (
     4  	"testing"
     5  
     6  	"github.com/stretchr/testify/assert"
     7  )
     8  
     9  func TestNewPool(t *testing.T) {
    10  	pool, err := NewPool(20)
    11  	assert.NoError(t, err)
    12  	assert.Equal(t, pool.Cap(), 20)
    13  }