tests

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2019 License: Apache-2.0 Imports: 7 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RawVectorParty

type RawVectorParty struct {
	DataType  string   `yaml:"data_type"`
	Length    int      `yaml:"length"`
	Values    []string `yaml:"values"`
	HasCounts bool     `yaml:"has_counts"`
}

type TestFactoryBase

type TestFactoryBase struct {
	RootPath string
	utils.FileSystem
	// functions to do real vp conversion, need to pass in from caller
	ToArchiveVectorParty func(common.VectorParty, sync.Locker) common.ArchiveVectorParty
	ToLiveVectorParty    func(common.VectorParty) common.LiveVectorParty
	ToVectorParty        func(*RawVectorParty, bool) (common.VectorParty, error)
}

TestFactoryT creates memstore test objects from text file

func (TestFactoryBase) ReadArchiveBatch

func (t TestFactoryBase) ReadArchiveBatch(name string) (*common.Batch, error)

ReadArchiveBatch read batch and do pruning for every columns.

func (TestFactoryBase) ReadArchiveVectorParty

func (t TestFactoryBase) ReadArchiveVectorParty(name string, locker sync.Locker) (common.ArchiveVectorParty, error)

ReadArchiveVectorParty loads a vector party and prune it after construction.

func (TestFactoryBase) ReadBatch

func (t TestFactoryBase) ReadBatch(name string, forLiveVP bool) (*common.Batch, error)

ReadBatch returns a batch given batch name. Batch will be searched under testing/data/batches folder. Prune tells whether need to prune the columns after column contruction.

func (TestFactoryBase) ReadLiveBatch

func (t TestFactoryBase) ReadLiveBatch(name string) (*common.Batch, error)

ReadLiveBatch read batch and skip pruning for every columns.

func (TestFactoryBase) ReadLiveVectorParty

func (t TestFactoryBase) ReadLiveVectorParty(name string) (common.LiveVectorParty, error)

ReadLiveVectorParty loads a vector party and skip pruning.

func (TestFactoryBase) ReadUpsertBatch

func (t TestFactoryBase) ReadUpsertBatch(name string) (*common.UpsertBatch, error)

ReadUpsertBatch returns a pointer to UpsertBatch given the upsert batch name.

func (TestFactoryBase) ReadVector

func (t TestFactoryBase) ReadVector(name string) (*vectors.Vector, error)

ReadVector returns a vector given vector name. Vector will be searched under testing/data/vectors folder.

func (TestFactoryBase) ReadVectorParty

func (t TestFactoryBase) ReadVectorParty(name string, forLiveVP bool) (common.VectorParty, error)

ReadVectorParty returns a vector party given vector party name. Vector party will be searched under testing/data/vps folder. Prune tells whether to prune this column.

Jump to

Keyboard shortcuts

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