Skip to content

Commit

Permalink
Use option builder in test
Browse files Browse the repository at this point in the history
  • Loading branch information
Ibrahim Jarif committed Jun 27, 2019
1 parent e486194 commit db16a22
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions db2_test.go
Expand Up @@ -339,10 +339,9 @@ func BenchmarkDBOpen(b *testing.B) {
b.Skip("Please set -benchdir to badger directory")
}
dir := *benchDir
opt := DefaultOptions
opt.Dir = dir
opt.ValueDir = dir
opt.ReadOnly = true
// Passing an empty directory since it will be filled by runBadgerTest.
opt := DefaultOptions(dir).
WithReadOnly(true)
for i := 0; i < b.N; i++ {
db, err := Open(opt)
require.NoError(b, err)
Expand Down

0 comments on commit db16a22

Please sign in to comment.