1
0
mirror of https://github.com/Oxalide/vsphere-influxdb-go.git synced 2023-10-10 13:36:51 +02:00
vsphere-influxdb-go/vendor/github.com/influxdata/influxdb/pkg/pool/bytes_test.go
2017-10-25 20:52:40 +00:00

17 lines
341 B
Go

package pool_test
import (
"testing"
"github.com/influxdata/influxdb/pkg/pool"
)
func TestLimitedBytePool_Put_MaxSize(t *testing.T) {
bp := pool.NewLimitedBytes(1, 10)
bp.Put(make([]byte, 1024)) // should be dropped
if got, exp := cap(bp.Get(10)), 10; got != exp {
t.Fatalf("max cap size exceeded: got %v, exp %v", got, exp)
}
}