Help us shape the future of Go! Take the 2026 Go Developer Survey

pubsubtest

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package pubsubtest is the conformance suite every pubsub.Broker implementation must pass. Backend packages call Run from their tests:

func TestConformance(t *testing.T) {
	pubsubtest.Run(t, func(t *testing.T) pubsub.Broker { return newBroker(t) })
}

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(t *testing.T, newBroker func(t *testing.T) pubsub.Broker)

Run executes the conformance suite. newBroker must return a new, open broker each time it is called; all brokers returned during one Run must share a backend (the same Redis server and prefix, the same Postgres database and channel, or memory peers of one bus) so that cross-broker delivery can be tested. The suite closes every broker it opens; Close must be idempotent. Topics are unique per subtest, so brokers may share a backend with other tests running concurrently.

Types

This section is empty.

Jump to

Keyboard shortcuts

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