metadatadbtest

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2026 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Suite

func Suite(t *testing.T, newBackends func(t *testing.T, n int) []metadatadb.Backend)

Suite runs a comprehensive test suite against a metadatadb.Backend implementation. The factory must return n backends that share the same underlying storage.

Types

type SoakConfig

type SoakConfig struct {
	Duration    time.Duration
	Concurrency int
	NumKeys     int
}

SoakConfig configures the soak test parameters.

type SoakResult

type SoakResult struct {
	Ops      int64
	Flushes  int64
	Errors   int64
	Duration time.Duration
}

SoakResult contains the results of a soak test run.

func Soak

func Soak(t *testing.T, backend metadatadb.Backend, config SoakConfig) SoakResult

Soak runs a concurrent soak test against a backend, exercising all data structure types with random operations and periodic flushes, then verifies consistency by checking monotonic invariants and round-trip equality.

Jump to

Keyboard shortcuts

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