eventbustest

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package eventbustest provides shared test helpers for modulex.EventBus adapter implementations.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunHandlerErrorLoggingTests

func RunHandlerErrorLoggingTests(t *testing.T, newBus func(logger *slog.Logger) modulex.EventBus, topic string, timeout, logWait time.Duration)

func RunPublishSubscribeTests

func RunPublishSubscribeTests(t *testing.T, newBus func() modulex.EventBus, topic string, timeout time.Duration)

Types

type SyncBuffer

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

SyncBuffer is a concurrency-safe io.Writer wrapping a bytes.Buffer. It is useful for capturing log output written by adapter goroutines while the test polls the buffer from the main goroutine.

func (*SyncBuffer) String

func (b *SyncBuffer) String() string

func (*SyncBuffer) Write

func (b *SyncBuffer) Write(p []byte) (int, error)

Jump to

Keyboard shortcuts

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