Skip to content

Commit

Permalink
chore: add clean up to close dbs while testing
Browse files Browse the repository at this point in the history
  • Loading branch information
EclesioMeloJunior committed Jul 23, 2021
1 parent 641125a commit 09f64b7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/grandpa/grandpa_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ func newTestState(t *testing.T) *state.Service {
db, err := utils.SetupDatabase(testDatadirPath, true)
require.NoError(t, err)

t.Cleanup(func() { db.Close() })

gen, genTrie, _ := genesis.NewTestGenesisWithTrieAndHeader(t)
block, err := state.NewBlockStateFromGenesis(db, testHeader)
require.NoError(t, err)
Expand Down

0 comments on commit 09f64b7

Please sign in to comment.