testing

package
v1.40.4 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package testing provides shared test utilities for use across internal packages.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RequireWaitGroupDone

func RequireWaitGroupDone(t *testing.T, wg *sync.WaitGroup, timeout time.Duration, msgAndArgs ...any)

RequireWaitGroupDone is a test helper that waits for a WaitGroup with a timeout. It fails the test if the WaitGroup doesn't complete within the timeout.

func WaitGroupWithTimeout

func WaitGroupWithTimeout(ctx context.Context, wg *sync.WaitGroup) bool

WaitGroupWithTimeout waits for a WaitGroup with a timeout provided by context. Returns true if the WaitGroup completed within the timeout, false if it timed out. This prevents tests from hanging indefinitely if a WaitGroup is never released.

Types

This section is empty.

Jump to

Keyboard shortcuts

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