Skip to content

feat: add a finalizer option to VerifyTestMain - #158

Open
sb123sb123 wants to merge 1 commit into
uber-go:masterfrom
sb123sb123:codex/issue-133-with-finalizer
Open

sb123sb123 wants to merge 1 commit into
uber-go:masterfrom
sb123sb123:codex/issue-133-with-finalizer

Conversation

@sb123sb123

Copy link
Copy Markdown

Summary

Add goleak.WithFinalizer for VerifyTestMain.

The callback runs after m.Run() and before goroutine leak detection, so package-level providers or other resources can be finalized before the final scan. Passing the option to Find is rejected, matching the existing option validation pattern.

Fixes #133

Validation

  • go test ./... -run "^(TestVerifyTestMain|TestFind)$" -count=1
  • go test ./... -count=1
  • go vet ./...
  • git diff --check
  • A focused -race run was attempted but the Windows environment lacks a usable C compiler and headers (errno.h, stdlib.h, and windows.h).

AI disclosure

This change was prepared with assistance from an AI coding agent. The issue state, open PRs, repository policy files, diff, and test results were checked on the target branch.

@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

consider WithFinalizer option (or similar)

2 participants