Documentation
¶
Overview ¶
Package sessiontest provides executable continuation-store conformance checks.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckContinuation ¶
func CheckContinuation(ctx context.Context, store session.ContinuationStore, id string, crashHook ...ContinuationCrashHook) error
CheckContinuation checks ID-first idempotency, body comparison, and head CAS. The caller provides a newly created, empty session. An optional crash hook also checks rollback and retry publication. Errors identify the broken rule.
func CheckContinuationRounds ¶
func CheckContinuationRounds(ctx context.Context, store session.ContinuationStore, sessionID string) error
CheckContinuationRounds races publishers from the same head through four successive positions. Every round must commit exactly one body and head.
Types ¶
type ContinuationCrashHook ¶
type ContinuationCrashHook func(context.Context, session.Continuation) error
ContinuationCrashHook attempts to publish the supplied body with a store-specific fault between the body insert and head update, returning the injected error. The hook must disarm the fault before returning so a normal retry can succeed. Stores with an indivisible in-memory update can use a cancelled-context attempt.