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

backendtest

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package backendtest is the conformance suite every session.Backend implementation of the module runs in its tests: put, get, pop, compare and swap, revoke, per-value TTLs, revocation markers, atomic Pop and CompareAndSwap, and revocation racing a Put. Use it from tests only.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(t *testing.T, newBackend func(t *testing.T) (session.Backend, func(duration time.Duration)))

Run exercises every session.Backend contract (put/get/pop/compare-and-swap/revoke, TTL, atomic pop and swap under -race, revoke marker vs put). newBackend returns a fresh, empty backend for one subtest and the function that moves that backend's clock forward (miniredis: FastForward; the memory backend: its test clock).

Types

This section is empty.

Jump to

Keyboard shortcuts

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