package test

import "github.com/Azure/go-amqp/internal/test"

Index

Functions

func Diff

func Diff(x, y any) string

func Equal

func Equal(x, y any) bool

Types

type MuxSemaphore

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

func NewMuxSemaphore(count int) *MuxSemaphore

NewMuxSemaphore creates a new MuxSemaphore with the specified count.

func (*MuxSemaphore) OnLoop

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

func (m *MuxSemaphore) Release(count int)

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

panics if the wait exceeds 5s.

func (*MuxSemaphore) Wait

func (m *MuxSemaphore) Wait()

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

Source Files

test.go

Version
v1.4.0 (latest)
Published
Feb 19, 2025
Platform
linux/amd64
Imports
4 packages
Last checked
5 days ago

Tools for package owners.