attemptconformance

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package attemptconformance provides the shared lifecycle contract for learning.AttemptRepository adapters. Memory, durable local, and remote driver implementations run this same suite; storage layout and transport are not part of the contract.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(t *testing.T, factory Factory)

Run executes the complete AttemptRepository lifecycle contract.

func RunDiscovery

func RunDiscovery(t *testing.T, factory Factory)

RunDiscovery pins storage-neutral worker discovery across owner partitions.

func RunRetentionAndDeletion

func RunRetentionAndDeletion(t *testing.T, factory Factory)

RunRetentionAndDeletion pins the caller-partitioned cleanup and claimed-work deletion rules independently so acceptance tests can name this exact scenario.

Types

type Factory

type Factory func(*testing.T) Harness

Factory returns a fresh, isolated repository harness for each subtest.

type Harness

type Harness struct {
	Repository learning.AttemptRepository
	SetNow     func(time.Time)
}

Harness supplies a fresh repository and a deterministic clock control. SetNow changes the time observed by every repository lifecycle operation.

Jump to

Keyboard shortcuts

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