Skip to content

fix: close clients in tests (ethereum#29512) - #128

Merged
hmlee-wm merged 1 commit into
devfrom
fix/rpc-close-clients-in-tests
Sep 15, 2026
Merged

hmlee-wm merged 1 commit into
devfrom
fix/rpc-close-clients-in-tests

Conversation

@hmlee-wm

@hmlee-wm hmlee-wm commented Sep 4, 2026

Copy link
Copy Markdown
Collaborator

Summary

Ports ethereum#29512. Add missing defer client.Close() / defer c.Close() calls in RPC tests to prevent goroutine leaks after test execution, and remove a duplicate defer client.Close() in TestClientHTTP.

Upstream References

PR Description
#29512 rpc: close Clients in tests

Changes

  • rpc/client_test.go: add defer client.Close() in TestClientBatchRequestLimit, testClientCancel, TestClientSubscriptionChannelClose; remove duplicate defer client.Close() in TestClientHTTP
  • rpc/websocket_test.go: add defer c.Close() in TestWebsocketPeerInfo, TestClientWebsocketLargeMessage

(cherry picked from commit 71c78bf56da29dc8b85cddc9da09eabf18131ee8)
@hmlee-wm hmlee-wm self-assigned this Sep 4, 2026
@hmlee-wm hmlee-wm added the bug Something isn't working label Sep 4, 2026

@colinkim colinkim left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@eomti-wm eomti-wm left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@hmlee-wm
hmlee-wm merged commit 740526d into dev Sep 15, 2026
3 checks passed
@hmlee-wm
hmlee-wm deleted the fix/rpc-close-clients-in-tests branch September 15, 2026 07:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants