Discover Packages
github.com/ag4r/chaotic
chaostest
quick
package
Version:
v1.3.0
Opens a new window with list of versions in this module.
Published: Jun 2, 2026
License: MIT
Opens a new window with license information.
Imports: 6
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Jump to ...
Documentation
Overview
Index
Constants
Variables
Functions
FailFirst(t, eng, n, kind, err)
PanicOnce(t, eng, kind, v)
SlowAlways(t, eng, kind, d)
Types
Source Files
Documentation
Documentation
¶
Package quick provides opinionated one-line shortcuts for the most common
chaos test setups. Users who outgrow them drop down to engine.NewRule.
func FailFirst(t testing.TB, eng *engine.Engine, n int, kind engine.Kind, err error)
func PanicOnce(t testing.TB, eng *engine.Engine, kind engine.Kind, v any)
func SlowAlways(t testing.TB, eng *engine.Engine, kind engine.Kind, d time.Duration)
FailFirst adds a rule that returns err on the first n matches of kind,
then becomes inert. The rule named "quick:fail-first" plus a unique
counter so multiple calls in one test don't collide.
PanicOnce adds a rule that panics with v on the first matching call.
SlowAlways adds a rule that delays every matching call by d.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.