# fortytw2/leaktest

Goroutine Leak Detector

Repository: https://github.com/fortytw2/leaktest
Canonical: https://ross.abutalabs.com/products/leaktest
Language: Go
License: BSD-3-Clause
License Family: permissive
Topics: go, goroutine, leak-detection, test-helper
Last push: 2020-10-15T17:02:31+00:00

## Health v2 (maintenance only)
Score: 23/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 0, release rhythm 8, longevity 100
- inputs: {"age_days": 3781, "days_push": 2148, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1044, forks 47 (observed 2026-08-28T04:03:21.129275+00:00)

## What it is
A small Go testing library that detects goroutine leaks by snapshotting running goroutines at the start and end of a test and comparing them. It is a refactored, tested variant of the leak detector used in Go's net/http tests and CockroachDB.

## Use cases
- detect goroutine leaks in Go tests
- fail tests that leave goroutines running
- verify goroutine cleanup after test completion
- add leak checking with custom timeouts
- check leaks using context-based cancellation

## When to choose
- you write Go tests for concurrent code and want to catch leaked goroutines
- you want a tiny drop-in test helper with defer-based usage

## When to avoid
- your tests use t.Parallel(), which leaktest does not support well
- you need leak detection outside of Go or for non-goroutine resources

## Facets
- artifact type: library
- maturity: maintenance
- function: testing
- domain: testing, developer-tools
- platform: go, cli
- tags: goroutine-leak-detection, test-helper, concurrency

## Member repositories
- fortytw2/leaktest (main) score 23

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:03:21.129275+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T07:02:13.207368+00:00, confidence not recorded.
  - readme: https://github.com/fortytw2/leaktest (fetched 2026-08-28T04:03:21.129275+00:00, sha 34b0875bd748)
- Data as of 2026-08-30T08:39:29.467469+00:00.
