drivertest

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package drivertest provides a public conformance suite that any azync storage driver can run against its own driver.Store to prove it honors the backend-agnostic contract. Third-party driver authors wire their backend into RunConformance and get the same behavioral coverage the first-party PostgreSQL driver is held to.

The suite is black-box: it drives a Store only through the exported contract, never reaching into backend internals. It uses real wall-clock durations (a short lease plus a sleep for reaper tests, a far-future run_at for scheduling) so it is correct against any backend clock without a controllable clock.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunConformance

func RunConformance(t *testing.T, newStore func(t *testing.T) driver.Store)

RunConformance exercises the observable driver.Store contract against the Store returned by newStore. newStore is called once; every subtest shares that Store and stays independent by using unique kind and subscriber names, so a backend need not reset between subtests (they must not assume an empty store).

func RunDAGConformance

func RunDAGConformance(t *testing.T, newStore func(t *testing.T) driver.Store)

RunDAGConformance exercises the observable driver.DAGStore contract against the Store returned by newStore, skipping cleanly when the store does not implement the capability. newStore is called once; every subtest shares that Store and stays independent by using unique workflow names and kinds, so a backend need not reset between subtests.

The scheduler methods are set-based across the whole store, so subtests assert on the states of their own workflow's tasks (through DAGTasks and GetDAG), never on the global counts those methods return.

func RunWorkflowConformance

func RunWorkflowConformance(t *testing.T, newStore func(t *testing.T) driver.Store)

RunWorkflowConformance exercises the observable driver.WorkflowStore contract against the Store returned by newStore, skipping cleanly when the store does not implement the capability. newStore is called once; every subtest stays independent by using unique workflow names, so a backend need not reset between subtests.

Types

This section is empty.

Jump to

Keyboard shortcuts

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