River

riverprosharedtest

package
v0.19.0 Go to latest
Published: Oct 8, 2025 License: Proprietary

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TestTxPgxPro

func TestTxPgxPro(ctx context.Context, tb testing.TB) pgx.Tx

TestTx starts a test transaction that's rolled back automatically as the test case is cleaning itself up.

This variant starts a transaction for the River Pro pgx/v5 driver. See also riverdbtest.TestTxPgx for the non-Pro version.

func WaitExpectTimeout

func WaitExpectTimeout[T any](t *testing.T, waitChan <-chan T)

WaitExpectTimeout tries to wait on the given channel for a value to come through, and fails the test if one does. Useful to check that a condition has not or will not occur.

Types

This section is empty.