test

package
v1.2.7 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	TestTableName0                     = "table0"
	TestTableName1                     = "table1"
	TestSchemaName                     = "TestSchemaName"
	TestRootPath                       = "/rootPath"
	DefaultIDAllocatorStep             = 20
	ClusterName                        = "ceresdbCluster1"
	DefaultNodeCount                   = 2
	DefaultShardTotal                  = 4
	DefaultSchedulerOperator           = true
	DefaultTopologyType                = "static"
	DefaultProcedureExecutingBatchSize = math.MaxUint32
)

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 InitPrepareCluster added in v1.2.1

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

InitPrepareCluster will return a cluster that has created shards and nodes, and cluster state is prepare.

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 MockIDAllocator added in v1.2.1

type MockIDAllocator struct{}

func (MockIDAllocator) Alloc added in v1.2.1

func (m MockIDAllocator) Alloc(_ context.Context) (uint64, error)

func (MockIDAllocator) Collect added in v1.2.1

func (m MockIDAllocator) Collect(_ context.Context, _ uint64) error

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