From 09f64b7a3536b9d19a75f31d00a46f9949257069 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ecl=C3=A9sio=20J=C3=BAnior?= Date: Fri, 23 Jul 2021 10:21:24 -0300 Subject: [PATCH] chore: add clean up to close dbs while testing --- lib/grandpa/grandpa_test.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/grandpa/grandpa_test.go b/lib/grandpa/grandpa_test.go index ae325d76da..645faeda0e 100644 --- a/lib/grandpa/grandpa_test.go +++ b/lib/grandpa/grandpa_test.go @@ -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)