Skip to content

Commit 7a565fa

Browse files
authored
console: add cleanup to avoid leaks in newTester (#27695)
1 parent 645b0db commit 7a565fa

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

console/console_test.go

+4
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,10 @@ func newTester(t *testing.T, confOverride func(*ethconfig.Config)) *tester {
111111
t.Fatalf("failed to start test stack: %v", err)
112112
}
113113
client := stack.Attach()
114+
t.Cleanup(func() {
115+
client.Close()
116+
})
117+
114118
prompter := &hookedPrompter{scheduler: make(chan string)}
115119
printer := new(bytes.Buffer)
116120

0 commit comments

Comments
 (0)