Add goroutine leak detection tests to Relayer, TXM, and LogPoller services#734
Draft
ogtownsend wants to merge 12 commits into
Draft
Add goroutine leak detection tests to Relayer, TXM, and LogPoller services#734ogtownsend wants to merge 12 commits into
ogtownsend wants to merge 12 commits into
Conversation
|
👋 ogtownsend, thanks for creating this pull request! To help reviewers, please consider creating future PRs as drafts first. This allows you to self-review and make any final changes before notifying the team. Once you're ready, you can mark it as "Ready for review" to request feedback. Thanks! |
Contributor
There was a problem hiding this comment.
Pull request overview
Adds goroutine leak-detection coverage for TON core services by running real Start/Close paths under goleak, exercising key public APIs to ensure background loops and tickers shut down cleanly.
Changes:
- Add leak tests for
txm,logpoller, and a relay “bundle” (txm + logpoller + balance monitor) usingservicetest.RunHealthy()andtests.VerifyNoLeaks(). - Minor error formatting change in relay service (
%q→%v) for transaction status. - Update module/toolchain and dependencies (Go version,
chainlink-common,go-plugin, and related indirect deps), plus.cursor/added to.gitignore.
Reviewed changes
Copilot reviewed 5 out of 7 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| pkg/txm/leak_test.go | New goleak-backed test that starts Txm, exercises Enqueue, and verifies clean shutdown. |
| pkg/logpoller/leak_test.go | New goleak-backed test that starts LogPoller, exercises filter ops + replay, and verifies clean shutdown. |
| pkg/relay/leak_test.go | New leak test that starts Txm + LogPoller + balance monitor together to mirror chain wiring. |
| pkg/relay/service.go | Adjust error formatting for unexpected transaction status. |
| go.mod | Bumps Go version and updates dependencies (incl. adding goleak indirect). |
| go.sum | Dependency checksum updates from the module changes. |
| .gitignore | Ignores .cursor/ directory. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
ogtownsend
commented
May 8, 2026
| rv := reflect.ValueOf(data) | ||
| rt := rv.Type() | ||
| if rt.Kind() == reflect.Ptr { | ||
| if rt.Kind() == reflect.Pointer { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
chainlink-common/pkg/services/servicetest/run.goRunHealthy()to run tests: https://github.com/smartcontractkit/chainlink-common/blob/main/pkg/services/servicetest/run.go#L41go func() { select {} }()and re-ran the test, confirmed it throws an error: