Help us shape the future of Go! Take the 2026 Go Developer Survey

envtestreaper

package
v0.11.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 16, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package envtestreaper kills envtest servers that earlier test runs left behind.

envtest runs kube-apiserver and etcd as children of the test binary, and only a deferred Environment.Stop ends them. When the binary dies without running its defers (the -timeout panic, a kill, a Ctrl+C), they are reparented to PID 1 and run until someone kills them, piling up across runs (#524). Calling Reap from TestMain kills them when the next run starts.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Reap

func Reap(logf func(format string, args ...any))

Reap SIGKILLs every envtest server orphaned by an earlier run, and reports through logf what it killed and what it could not. A process whose parent is PID 1 has lost the test binary that started it, so it cannot belong to a live run. Reap is best-effort: it never fails, and it skips any process it cannot inspect.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL