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.
Types ¶
This section is empty.