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 ¶
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.
Click to show internal directories.
Click to hide internal directories.