Skip to content

Commit da60399

Browse files
handle is left open in importRootKeys (#3039)
## Summary The database handle is not closed in this code path. In normal situations, this passes unnoticed, since it will be closed once the test terminates. However, when running the test multiple times, the OS will complain about too many open files. ## Test Plan This is a test infrastructure fix.
1 parent e86c53f commit da60399

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

test/framework/fixtures/libgoalFixture.go

+1
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,7 @@ func (f *LibGoalFixture) importRootKeys(lg *libgoal.Client, dataDir string) {
170170
f.failOnError(err, "couldn't import secret: %v")
171171
}
172172
accountsWithRootKeys[root.Address().String()] = true
173+
handle.Close()
173174
} else if config.IsPartKeyFilename(filename) {
174175
// Fetch a handle to this database
175176
handle, err = db.MakeErasableAccessor(filepath.Join(keyDir, filename))

0 commit comments

Comments
 (0)