testbarrier

package
v0.0.0-...-6d78eec Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package testbarrier implements a barrier for testing asynchronous systems.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Barrier

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

Barrier blocks tests for a limited duration until an event happens.

func New

func New() Barrier

New creates a Barrier.

func (Barrier) Lift

func (b Barrier) Lift()

Lift the barrier. Must be called when the event happens.

func (Barrier) Wait

func (b Barrier) Wait(t testingT, d time.Duration)

Wait for the barrier to lift for up to a duration `d`. If the deadline expires, the test will fail immediately.

Jump to

Keyboard shortcuts

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