MCPcopy
hub / github.com/etcd-io/bbolt / mustCreateDB

Function mustCreateDB

concurrent_test.go:218–222  ·  view source on GitHub ↗

mustCreateDB is created in place of `btesting.MustCreateDB`, and it's only supposed to be used by the concurrent test case. The purpose is to ensure the test case can be executed on old branches or versions, e.g. `release-1.3` or `1.3.[5-7]`.

(t *testing.T, o *bolt.Options)

Source from the content-addressed store, hash-verified

216// to ensure the test case can be executed on old branches or versions,
217// e.g. `release-1.3` or `1.3.[5-7]`.
218func mustCreateDB(t *testing.T, o *bolt.Options) *bolt.DB {
219 f := filepath.Join(t.TempDir(), "db")
220
221 return mustOpenDB(t, f, o)
222}
223
224func mustReOpenDB(t *testing.T, db *bolt.DB, o *bolt.Options) *bolt.DB {
225 f := db.Path()

Callers 2

concurrentReadAndWriteFunction · 0.85

Calls 1

mustOpenDBFunction · 0.85

Tested by

no test coverage detected