MCPcopy
hub / github.com/dgraph-io/badger / getTestOptions

Function getTestOptions

db_test.go:71–81  ·  view source on GitHub ↗
(dir string)

Source from the content-addressed store, hash-verified

69func (s *DB) validate() error { return s.lc.validate() }
70
71func getTestOptions(dir string) Options {
72 opt := DefaultOptions(dir).
73 WithMaxTableSize(1 << 15). // Force more compaction.
74 WithLevelOneSize(4 << 15). // Force more compaction.
75 WithSyncWrites(false).
76 WithMaxCacheSize(10 << 20)
77 if !*mmap {
78 return opt.WithValueLogLoadingMode(options.FileIO)
79 }
80 return opt
81}
82
83func getItemValue(t *testing.T, item *Item) (val []byte) {
84 t.Helper()

Callers 15

TestWriteBatchFunction · 0.85
TestEmptyWriteBatchFunction · 0.85
TestManifestBasicFunction · 0.85
TestIteratePrefixFunction · 0.85
TestDropAllManagedFunction · 0.85
TestDropAllFunction · 0.85
TestDropAllTwiceFunction · 0.85
TestDropReadOnlyFunction · 0.85
TestWriteAfterCloseFunction · 0.85

Calls 6

DefaultOptionsFunction · 0.85
WithMaxCacheSizeMethod · 0.80
WithSyncWritesMethod · 0.80
WithLevelOneSizeMethod · 0.80
WithMaxTableSizeMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…