Skip to content

Commit

Permalink
Merge pull request #52 from ipfs/fix-test-close-order
Browse files Browse the repository at this point in the history
fix closing of datastore in tests
  • Loading branch information
marten-seemann authored May 17, 2021
2 parents ddf38bb + 9e727aa commit 0553b14
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions ds_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,12 @@ func newDS(t *testing.T) (*Datastore, func()) {
t.Fatal(err)
}
return d, func() {
os.RemoveAll(path)
d.Close()
if err := d.Close(); err != nil {
t.Fatal(err)
}
if err := os.RemoveAll(path); err != nil {
t.Fatal(err)
}
}
}

Expand Down

0 comments on commit 0553b14

Please sign in to comment.