console: add cleanup to avoid leaks in newTester (#27695)
This commit is contained in:
parent
645b0db98e
commit
7a565fa4fe
|
@ -111,6 +111,10 @@ func newTester(t *testing.T, confOverride func(*ethconfig.Config)) *tester {
|
||||||
t.Fatalf("failed to start test stack: %v", err)
|
t.Fatalf("failed to start test stack: %v", err)
|
||||||
}
|
}
|
||||||
client := stack.Attach()
|
client := stack.Attach()
|
||||||
|
t.Cleanup(func() {
|
||||||
|
client.Close()
|
||||||
|
})
|
||||||
|
|
||||||
prompter := &hookedPrompter{scheduler: make(chan string)}
|
prompter := &hookedPrompter{scheduler: make(chan string)}
|
||||||
printer := new(bytes.Buffer)
|
printer := new(bytes.Buffer)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue