Documentation ¶
Overview ¶
Package seqtest provides a test fixture for instantiating sequencers and other general-purpose test helpers.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckSequencer ¶
func CheckSequencer( t *testing.T, pre func(t *testing.T, fixture *all.Fixture, seqFixture *Fixture) sequencer.Sequencer, post func(t *testing.T, check *Check), )
CheckSequencer implements a general-purpose smoke test of a sequencer.Sequencer implementation. The sequencer must support foreign-key relationships. The post-hook may be nil.
func Fragment ¶
func Fragment(batch *types.MultiBatch) ([]*types.MultiBatch, error)
Fragment breaks a batch up into a number of minimum-sized batches which are representative of how the bulk-transfer CDC feed delivers data (i.e. payloads per table). The data for any given table will remain in a time-ordered fashion.
Types ¶
type Check ¶
type Check struct { // The acceptor returned by [sequencer.Sequencer.Start]. Acceptor types.MultiAcceptor // The total number of transactions to apply. Batches int // Populated by Check. Bounds notify.Var[hlc.Range] // Access to test services. Fixture *all.Fixture // Populated by Check. Generator *all.Workload // Populated by Check. Group *types.TableGroup // The Sequencer under test. Sequencer sequencer.Sequencer // If true, generated data will be loaded into staging first. This // is used to validate the sweeping behavior of a sequencer. Stage bool }
Check implements a reusable test over a parent/child table pair.
type CheckFlag ¶
type CheckFlag int
CheckFlag describes the range of configurations to be tested. See CheckFlags.
type Fixture ¶
type Fixture struct { *all.Fixture BestEffort *besteffort.BestEffort Chaos *chaos.Chaos Core *core.Core Immediate *immediate.Immediate Retire *retire.Retire Script *script.Sequencer Switcher *switcher.Switcher }
Fixture provides ready-to-use instances of sequencer types.