test

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Diff

func Diff(x, y any) string

func Equal

func Equal(x, y any) bool

Types

type MuxSemaphore added in v0.19.0

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

MuxSemaphore is a helper for managing rendezvous with the mux at certain points during execution.

func NewMuxSemaphore added in v0.19.0

func NewMuxSemaphore(count int) *MuxSemaphore

NewMuxSemaphore creates a new MuxSemaphore with the specified count.

  • count is the number of iterations the mux will execute before pausing

func (*MuxSemaphore) OnLoop added in v0.19.0

func (m *MuxSemaphore) OnLoop()

OnLoop is to be called from your mux test hook. panics if the pause/resume cycle takes more than 5s.

func (*MuxSemaphore) Release added in v0.19.0

func (m *MuxSemaphore) Release(count int)

Release - call this to resume the mux with a new count (zero-based)

  • count is the number of iterations the mux will execute before pausing, pass -1 to close the semaphore

panics if the wait exceeds 5s.

func (*MuxSemaphore) Wait added in v0.19.0

func (m *MuxSemaphore) Wait()

Wait - blocks until the mux is paused. panics if the wait exceeds 5s.

Jump to

Keyboard shortcuts

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