test

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: May 6, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TestTableName0                         = "table0"
	TestTableName1                         = "table1"
	TestSchemaName                         = "TestSchemaName"
	TestRootPath                           = "/rootPath"
	DefaultIDAllocatorStep                 = 20
	ClusterName                            = "ceresdbCluster1"
	DefaultNodeCount                       = 2
	DefaultReplicationFactor               = 1
	DefaultPartitionTableProportionOfNodes = 0.5
	DefaultShardTotal                      = 4
	DefaultSchedulerOperator               = true
	DefaultTopologyType                    = "static"
)

Variables

This section is empty.

Functions

func InitEmptyCluster added in v1.2.0

func InitEmptyCluster(ctx context.Context, t *testing.T) *cluster.Cluster

InitEmptyCluster will return a cluster that has created shards and nodes, but it does not have any shard node mapping.

func InitStableCluster added in v1.2.0

func InitStableCluster(ctx context.Context, t *testing.T) *cluster.Cluster

InitStableCluster will return a cluster that has created shards and nodes, and shards have been assigned to existing nodes.

func NewTestStorage

func NewTestStorage(_ *testing.T) procedure.Storage

Types

type MockDispatch

type MockDispatch struct{}

func (MockDispatch) CloseShard

func (MockDispatch) CloseTableOnShard

func (MockDispatch) CreateTableOnShard

func (MockDispatch) DropTableOnShard

func (MockDispatch) OpenShard

func (MockDispatch) OpenTableOnShard

type MockStorage

type MockStorage struct{}

func (MockStorage) CreateOrUpdate

func (m MockStorage) CreateOrUpdate(_ context.Context, _ procedure.Meta) error

func (MockStorage) List

func (m MockStorage) List(_ context.Context, _ int) ([]*procedure.Meta, error)

func (MockStorage) MarkDeleted

func (m MockStorage) MarkDeleted(_ context.Context, _ uint64) error

Jump to

Keyboard shortcuts

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