MCPcopy Create free account
hub / github.com/couchbase/sync_gateway / NoCloseClone

Method NoCloseClone

base/util_testing.go:94–101  ·  view source on GitHub ↗

NoCloseClone returns a new test bucket referencing the same underlying bucket and bucketspec, but with an IgnoreClose leaky bucket, and a no-op close function. Used when multiple references to the same bucket are needed.

()

Source from the content-addressed store, hash-verified

92// NoCloseClone returns a new test bucket referencing the same underlying bucket and bucketspec, but
93// with an IgnoreClose leaky bucket, and a no-op close function. Used when multiple references to the same bucket are needed.
94func (tb *TestBucket) NoCloseClone() *TestBucket {
95 return &TestBucket{
96 Bucket: NoCloseClone(tb.Bucket),
97 BucketSpec: tb.BucketSpec,
98 closeFn: func(context.Context) {},
99 t: tb.t,
100 }
101}
102
103// GetTestBucket returns a test bucket from a pool.
104func GetTestBucket(t testing.TB) *TestBucket {

Calls 1

NoCloseCloneFunction · 0.85