test

package
v1.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 24, 2026 License: MIT Imports: 32 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BackendTest

func BackendTest(t *testing.T, setup func(options ...backend.BackendOption) TestBackend, teardown func(b TestBackend))

func EndToEndBackendTest

func EndToEndBackendTest(t *testing.T, setup func(options ...backend.BackendOption) TestBackend, teardown func(b TestBackend))

func SQLAtomicityTest added in v1.1.0

func SQLAtomicityTest(t *testing.T, factory func(*testing.T) (diag.Backend, *sql.DB))

SQLAtomicityTest makes individual tables unavailable after a task is leased. Every failed completion must leave the task and its original history intact.

func SQLCorruptionTest added in v1.1.0

func SQLCorruptionTest(t *testing.T, factory func(*testing.T) (diag.Backend, *sql.DB), activityReadsInstanceMetadata bool)

SQLCorruptionTest checks persisted data boundaries and rollback of failed polls.

func SQLFailureTest added in v1.1.0

func SQLFailureTest(t *testing.T, factory func(*testing.T) (diag.Backend, *sql.DB))

SQLFailureTest verifies that unavailable storage is never reported as success. The factory supplies a real connection to an isolated database without tables.

func SQLMutationTest added in v1.1.0

func SQLMutationTest(t *testing.T, factory func(*testing.T) (diag.Backend, *sql.DB))

SQLMutationTest checks lease identity and rollback across dependent writes.

func SQLRepositoryTest added in v1.2.0

func SQLRepositoryTest(t *testing.T, factory func(*testing.T) (diag.Backend, *sql.DB), dialect string)

SQLRepositoryTest exercises migration reuse, cursor ties and batched event joins through the same backend API on each SQL engine.

func SQLTableFaultTest added in v1.1.0

func SQLTableFaultTest(t *testing.T, factory func(*testing.T) (diag.Backend, *sql.DB))

SQLTableFaultTest verifies errors and rollback after dependent queries fail.

Types

type CustomError

type CustomError struct {
	// contains filtered or unexported fields
}

func (*CustomError) Error

func (e *CustomError) Error() string

type TestBackend

type TestBackend interface {
	backend.Backend

	GetFutureEvents(ctx context.Context) ([]*history.Event, error)
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL