Skip to content

Commit

Permalink
Fix the breaking test. Make it lightweight.
Browse files Browse the repository at this point in the history
  • Loading branch information
manishrjain committed Jun 4, 2018
1 parent 8b1006b commit 690400e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions db_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1394,17 +1394,17 @@ func TestLSMOnly(t *testing.T) {
_, err = Open(dopts)
require.Equal(t, ErrValueThreshold, err)

opts.ValueLogMaxEntries = 100
db, err := Open(opts)
require.NoError(t, err)
if err != nil {
t.Fatal(err)
}

for i := 0; i < 5000; i++ {
value := make([]byte, 64000)
_, err = rand.Read(value)
value := make([]byte, 128)
_, err = rand.Read(value)
for i := 0; i < 500; i++ {
require.NoError(t, err)

txnSet(t, db, []byte(fmt.Sprintf("key%d", i)), value, 0x00)
}
require.NoError(t, db.Close()) // Close to force compactions, so Value log GC would run.
Expand Down

0 comments on commit 690400e

Please sign in to comment.