testsupport

package
v1.0.0-rc.2 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2026 License: AGPL-3.0, AGPL-3.0-or-later Imports: 6 Imported by: 0

Documentation

Overview

Package testsupport holds small load-detection helpers shared by timing- sensitive tests across packages, so a wall-clock ceiling can be skipped under a loaded host instead of flaking (decision 0036).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HostAppearsLoaded

func HostAppearsLoaded(t *testing.T) bool

HostAppearsLoaded reports whether the current 1-minute load average exceeds the machine's core count, using /proc/loadavg on Linux and `sysctl -n vm.loadavg` on Darwin. It returns false (not loaded) whenever load cannot be determined, so the caller runs the test by default.

func SkipTimingUnderLoad

func SkipTimingUnderLoad(t *testing.T, reason string)

SkipTimingUnderLoad skips t when the host appears loaded, unless CORVINT_FORCE_TIMING_TESTS=1 forces timing-sensitive tests to run anyway.

Types

This section is empty.

Jump to

Keyboard shortcuts

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