checkpointtest

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package checkpointtest checks workflow.Checkpointer implementations against the contract the built-in checkpointers follow.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(t *testing.T, newCheckpointer func(t *testing.T) workflow.Checkpointer)

Run runs the conformance tests against checkpointers made by newCheckpointer, which must return an empty checkpointer independent of the others; it is called once per subtest and subtests run in parallel. The contract:

  • Load of a missing run returns workflow.ErrCheckpointNotFound; Delete of a missing run succeeds.
  • Save stores a copy of the checkpoint, replacing the run's previous one; every field round-trips as JSON and later changes to the saved or loaded checkpoint are not stored.
  • A checkpoint that cannot be encoded is rejected with an error, not a panic, leaving the stored one unchanged.
  • Run IDs are 1 to 64 ASCII letters, digits, '_' and '-'; others are rejected by Save, Load and Delete. They are case-sensitive, though a checkpointer whose medium cannot tell IDs differing only in case apart may reject the second one.
  • Checkpoints of several megabytes are stored, and concurrent use is safe: a Load returns one of the saved checkpoints, never a mix.

Types

This section is empty.

Jump to

Keyboard shortcuts

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