storetest

package
v1.9.5 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package storetest holds the behavioural contract every MessageStore backend must satisfy, so the backends can be proven to agree rather than merely to each work.

Agreement is the property that actually matters for replay. A resume cursor is issued by whichever node served the previous connection and redeemed by whichever node serves the next one, and in a load-balanced deployment those are routinely different processes — potentially running different backends during a migration. If "sequence 7" means one message in the local store and another in Redis, a reconnecting client is silently handed the wrong slice of history, and nothing in either backend's own test suite would catch it.

Written as an exported suite rather than duplicated per backend for the same reason: two copies of a contract drift, and the drift is invisible until it reaches production.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunMessageStoreContract

func RunMessageStoreContract(t *testing.T, newStore NewMessageStore)

RunMessageStoreContract asserts the sequencing and replay behaviour every backend must provide.

Types

type NewMessageStore

type NewMessageStore func(t *testing.T) streaming.MessageStore

NewMessageStore builds a connected, empty store for one test.

Jump to

Keyboard shortcuts

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