console: add cleanup to avoid leaks in newTester (#27695)

pull/27703/head
Mskxn 1 year ago committed by GitHub
parent 645b0db98e
commit 7a565fa4fe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      console/console_test.go

@ -111,6 +111,10 @@ func newTester(t *testing.T, confOverride func(*ethconfig.Config)) *tester {
t.Fatalf("failed to start test stack: %v", err)
}
client := stack.Attach()
t.Cleanup(func() {
client.Close()
})
prompter := &hookedPrompter{scheduler: make(chan string)}
printer := new(bytes.Buffer)

Loading…
Cancel
Save