pubsubtest

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package pubsubtest provides a shared Ginkgo behavior suite every pubsub.Notifier implementation must pass. A shared notifier reuses it verbatim — engine/notify/pgnotify does:

var _ = pubsubtest.Conformance("postgres", func() pubsub.Notifier { ... })

The specs are written for an asynchronous transport: delivery is asserted with Eventually, never "notify then immediately receive", so an implementation that hops through a broker passes the same suite as the in-process one. What they do assert strictly is the shape the server depends on — signals are content-free and coalesce, Notify never blocks on a subscriber that is not reading, and cancel is a clean, repeatable teardown.

The pubsub.Activity extension is covered too, and skipped for an implementation that does not offer it.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Conformance

func Conformance(name string, newNotifier func() pubsub.Notifier) bool

Conformance registers the notifier behavior specs. newNotifier is called per spec and must return a fresh notifier; if it owns resources, register their cleanup with DeferCleanup inside the func.

Types

This section is empty.

Jump to

Keyboard shortcuts

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