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

obsdbtest

package
v0.16.0 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2026 License: MIT Imports: 15 Imported by: 0

Documentation

Overview

Package obsdbtest is the shared conformance table for obsdb.DB backends — the executable form of S3.5's promises, the storetest pattern. Every backend runs it (sqlite here, clickhouse in its own module); Run takes a factory so each subtest gets a fresh database.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CommandsPruneRace added in v0.15.0

func CommandsPruneRace(t *testing.T, db obsdb.DB, between func(fn func(rule string)) (remove func()))

CommandsPruneRace holds obsdb.CommandStore.PruneCommands to its race rule: a Put that lands after a prune rule chose its rows and before it deleted them survives the prune with its own values. between arranges for fn to run inside PruneCommands at that point, once per rule — named "age", "keep", "routes", "runtimes" (fn ignores any other name) — and returns what removes the arrangement. A backend whose prune holds its writes off for the whole of each rule has no such point: its between calls fn for each of the four names before returning, and the Puts then precede the prune, which must keep them too. It skips when the backend is not a CommandStore.

func CommandsRestart added in v0.15.0

func CommandsRestart(t *testing.T, open func(t *testing.T) (first obsdb.DB, reopen func() obsdb.DB))

CommandsRestart is the restart property the runtime server builds on (plan I3): what one Studio process wrote through obsdb.CommandStore, a second one opened on the same storage after the first closed reads back — commands with their accepted and heartbeat times, routes, breakpoints, runtimes. open returns the first handle and a func that opens a second on the same storage; the case closes the first before calling it. It skips when the backend is not a CommandStore.

func Run

func Run(t *testing.T, open func(t *testing.T) obsdb.DB)

Run executes the conformance table against a backend. open returns a fresh DB for each subtest; the table never shares state between them.

Types

This section is empty.

Jump to

Keyboard shortcuts

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