Documentation ¶
Index ¶
- func ChannelHasItem[T any](t test.Failer, c <-chan T) T
- func ChannelIsClosed[T any](t test.Failer, c <-chan T)
- func ChannelIsEmpty[T any](t test.Failer, c <-chan T)
- func Compare[T any](a, b T) error
- func Equal[T any](t test.Failer, a, b T, context ...string)
- func Error(t test.Failer, err error)
- func EventuallyEqual[T any](t test.Failer, fetch func() T, expected T, retryOpts ...retry.Option)
- func NoError(t test.Failer, err error)
- type Tracker
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ChannelHasItem ¶
ChannelHasItem asserts a channel has an element within 5s and returns the element
func ChannelIsClosed ¶
ChannelIsClosed asserts a channel is closed
func ChannelIsEmpty ¶
ChannelIsEmpty asserts a channel is empty for at least 20ms
func EventuallyEqual ¶
EventuallyEqual compares repeatedly calls the fetch function until the result matches the expectation.
Types ¶
type Tracker ¶
type Tracker[T comparable] struct { // contains filtered or unexported fields }
func NewTracker ¶
func NewTracker[T comparable](t test.Failer) *Tracker[T]
NewTracker builds a tracker which records events that occur
func (*Tracker[T]) WaitCompare ¶
WaitCompare waits for an event to happen and ensures it meets a custom comparison function
func (*Tracker[T]) WaitOrdered ¶
func (t *Tracker[T]) WaitOrdered(events ...T)
WaitOrdered waits for an event to happen, in order
func (*Tracker[T]) WaitUnordered ¶
func (t *Tracker[T]) WaitUnordered(events ...T)
WaitUnordered waits for an event to happen, in any order
Click to show internal directories.
Click to hide internal directories.