presencetest

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package presencetest provides a shared Ginkgo behavior suite every presence.Bus implementation must pass. A shared bus reuses it verbatim — engine/presence/pgpresence does:

var _ = presencetest.Conformance("postgres", func() presence.Bus { ... })

The specs are written for an asynchronous transport: delivery is asserted with Eventually, never "publish then immediately receive", so an implementation that hops through a broker passes the same suite as the in-process one. What they assert strictly is the shape the Registry depends on — a publisher is never blocked by a watcher that is not reading, state is ordered by revision and may coalesce, broadcasts are never folded into one another, and cancel is a clean, repeatable teardown.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Conformance

func Conformance(name string, newBus func() presence.Bus) bool

Conformance registers the bus behavior specs. newBus is called per spec and must return a fresh bus; 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