Skip to content

Commit

Permalink
tidy
Browse files Browse the repository at this point in the history
  • Loading branch information
octu0 committed Jul 19, 2022
1 parent ff1f45d commit f715681
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

/tmp
/dist
/data
/cacheDb
/coverage.txt

Expand Down
17 changes: 10 additions & 7 deletions bitcask_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ func ExampleBasics() {
db.Merge()

// Output:
// hello
// world
// very
// larg
}
Expand Down Expand Up @@ -1890,17 +1890,20 @@ func TestRange(t *testing.T) {
}

func TestLocking(t *testing.T) {
assert := assert.New(t)

testdir, err := os.MkdirTemp("", "bitcask")
assert.NoError(err)
if err != nil {
t.Fatalf("no error: %+v", err)
}

db, err := Open(testdir)
assert.NoError(err)
if err != nil {
t.Fatalf("no error: %+v", err)
}
defer db.Close()

_, err = Open(testdir)
assert.Error(err)
if _, err = Open(testdir); err == nil {
t.Errorf("must error")
}
}

func TestGetExpiredInsideFold(t *testing.T) {
Expand Down

0 comments on commit f715681

Please sign in to comment.