test

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2019 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	MIN_REST_DURATION  = 1 * time.Millisecond
	MAX_REST_DURATION  = 5 * time.Millisecond
	MIN_BURST_DURATION = 1 * time.Millisecond
	MAX_BURST_DURATION = 10 * time.Millisecond
)

Functions

func Consistently

func Consistently(timeout time.Duration, f func() bool) bool

func Eventually

func Eventually(timeout time.Duration, f func() bool) bool

func StartCpuSchedulingJitter

func StartCpuSchedulingJitter()

creates ongoing random bursts of cpu noise (all cores together) to make goroutine scheduling erratic in -count 100 flakiness tests

func WithContext

func WithContext(f func(ctx context.Context))

func WithContextWithTimeout

func WithContextWithTimeout(d time.Duration, f func(ctx context.Context))

Types

type Latch

type Latch struct {
	// contains filtered or unexported fields
}

func NewLatch

func NewLatch() *Latch

func (*Latch) Resume

func (l *Latch) Resume(ctx context.Context)

func (*Latch) ReturnWhenLatchIsPaused

func (l *Latch) ReturnWhenLatchIsPaused(ctx context.Context)

func (*Latch) ReturnWhenLatchIsResumed

func (l *Latch) ReturnWhenLatchIsResumed(ctx context.Context)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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