testutil

package
v3.0.0-...-97acc46 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// CompactionCycle is high prime used to test hash calculation between compactions.
	CompactionCycle = 71
)

Variables

This section is empty.

Functions

func CorruptBBolt

func CorruptBBolt(fpath string) error

func PickKey

func PickKey(i int64) string

func TestCompactionHash

func TestCompactionHash(ctx context.Context, t *testing.T, h CompactionHashTestCase, compactionBatchLimit int)

Types

type CompactionHashTestCase

type CompactionHashTestCase interface {
	Put(ctx context.Context, key, value string) error
	Delete(ctx context.Context, key string) error
	HashByRev(ctx context.Context, rev int64) (KeyValueHash, error)
	Defrag(ctx context.Context) error
	Compact(ctx context.Context, rev int64) error
}

type KeyValueHash

type KeyValueHash struct {
	Hash            uint32
	CompactRevision int64
	Revision        int64
}

Jump to

Keyboard shortcuts

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