River

riverprodrivertest

package module
v0.24.0-beta.3 Go to latest
Published: May 1, 2026 License: Proprietary

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Benchmark

func Benchmark[TTx any](ctx context.Context, b *testing.B,
	driverWithPool func(ctx context.Context, b *testing.B) (riverprodriver.ProDriver[TTx], string),
	executorWithTx func(ctx context.Context, b *testing.B) riverprodriver.ProExecutor,
)

func Exercise

func Exercise[TTx any](ctx context.Context, t *testing.T,
	driverWithSchema func(ctx context.Context, t *testing.T, opts *riverdbtest.TestSchemaOpts) (riverprodriver.ProDriver[TTx], string),
	executorWithTx func(ctx context.Context, t *testing.T) (riverprodriver.ProExecutor, riverprodriver.ProDriver[TTx]),
)

Exercise fully exercises a driver. The driver's listener is exercised if supported.

func ExerciseMigrations

func ExerciseMigrations[TTx any](ctx context.Context, t *testing.T,
	makeDriver func(ctx context.Context, t *testing.T) (riverdriver.Driver[TTx], *pgxpool.Pool),
)

ExerciseMigrations runs migration-specific tests against the given driver. These tests verify that pro migrations can be applied up and down, and that migration 006 correctly handles both the old generated-column schema and the new trigger-based schema.

Types

This section is empty.