enginetest

package
v0.14.1 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2021 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package enginetest defines a list of tests that can be used to test a complete or partial engine implementation.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BenchmarkStorePut

func BenchmarkStorePut(b *testing.B, builder Builder)

BenchmarkStorePut benchmarks the Put method with 1, 10, 1000 and 10000 successive insertions.

func BenchmarkStoreScan

func BenchmarkStoreScan(b *testing.B, builder Builder)

BenchmarkStoreScan benchmarks the AscendGreaterOrEqual method with 1, 10, 1000 and 10000 successive insertions.

func TestEngine

func TestEngine(t *testing.T, builder Builder)

TestEngine runs a list of tests against the provided engine.

func TestQueries

func TestQueries(t *testing.T, builder Builder)

TestQueries test simple queries against the engine.

func TestQueriesSameTransaction

func TestQueriesSameTransaction(t *testing.T, builder Builder)

TestQueriesSameTransaction test simple queries in the same transaction.

func TestStoreDelete

func TestStoreDelete(t *testing.T, builder Builder)

TestStoreDelete verifies Delete behaviour.

func TestStoreGet

func TestStoreGet(t *testing.T, builder Builder)

TestStoreGet verifies Get behaviour.

func TestStoreIterator

func TestStoreIterator(t *testing.T, builder Builder)

TestStoreIterator verifies Iterator behaviour.

func TestStorePut

func TestStorePut(t *testing.T, builder Builder)

TestStorePut verifies Put behaviour.

func TestStoreTruncate

func TestStoreTruncate(t *testing.T, builder Builder)

TestStoreTruncate verifies Truncate behaviour.

func TestSuite

func TestSuite(t *testing.T, builder Builder)

TestSuite tests an entire engine, transaction and related types needed to implement a Genji engine.

func TestTransactionCommitRollback

func TestTransactionCommitRollback(t *testing.T, builder Builder)

TestTransactionCommitRollback runs a list of tests to verify Commit and Rollback behaviour of transactions created from the given engine.

func TestTransactionCreateStore

func TestTransactionCreateStore(t *testing.T, builder Builder)

TestTransactionCreateStore verifies CreateStore behaviour.

func TestTransactionDropStore

func TestTransactionDropStore(t *testing.T, builder Builder)

TestTransactionDropStore verifies DropStore behaviour.

func TestTransactionGetStore added in v0.9.0

func TestTransactionGetStore(t *testing.T, builder Builder)

TestTransactionGetStore verifies GetStore behaviour.

Types

type Builder

type Builder func() (engine.Engine, func())

Builder is a function that can create an engine on demand and that provides a function to cleanup up and remove any created state. Note that the engine is not closed on cleanup. Tests will use the builder like this:

ng, cleanup := builder()
defer cleanup()
...

Jump to

Keyboard shortcuts

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