test_helpers

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2022 License: AGPL-3.0, AGPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const AryDim uint32 = 10 // Dimension (capacity) of array of YDBBufferT structs we create here
View Source
const DebugFlag bool = false // Enable/Disable some simple debugging
View Source
const SubSiz uint32 = 15 // Max length of subscripts
View Source
const Timeout uint64 = 10 * uint64(time.Second) // 10 second timeout (in nanoseconds)
View Source
const ValSiz uint32 = 128 // Max size of values
View Source
const VarSiz uint32 = 15 // Max size of varname including '^'

Variables

This section is empty.

Functions

func Assertnoerr

func Assertnoerr(err error, t *testing.T)

Define assert function to validate return codes and panic is assertion fails

func Available

func Available(name string) bool

func Buftary2strary

func Buftary2strary(tptoken uint64, errstr *yottadb.BufferT, buftary *yottadb.BufferTArray, t *testing.T) (*[]string, error)

Routine to take a BufferTArray full of subscripts and turn it into a string array of the same subscripts

func CheckErrorExpectYDB_ERR_INSUFFSUBS

func CheckErrorExpectYDB_ERR_INSUFFSUBS(errorcode int) bool

func CheckErrorExpectYDB_ERR_NODEEND

func CheckErrorExpectYDB_ERR_NODEEND(errorcode int) bool

func CheckErrorExpectYDB_ERR_STRUCTUNALLOCD added in v1.2.0

func CheckErrorExpectYDB_ERR_STRUCTUNALLOCD(errorcode int) bool

func Cmpstrary

func Cmpstrary(astr, bstr *[]string) bool

Routine to compare two string arrays for equality. Returns true if they are the same (used length and strings)

func Dbdeleteall

func Dbdeleteall(tptoken uint64, errstr *yottadb.BufferT, errors *int, t *testing.T)

Routine to empty the database of everything currently defined in it

func GetHeapUsage

func GetHeapUsage(t *testing.T) int

func GetSystemMemory

func GetSystemMemory(t *testing.T) int

func MyGoCallBack

func MyGoCallBack(tptoken uint64, tpfnarg unsafe.Pointer) int

func RunTimedTests

func RunTimedTests() bool

By default, we run timed tests; if we are running in a place

where we expect the system will be loaded, we might skip them

func SkipARMV7LTests

func SkipARMV7LTests(t *testing.T)

func SkipCITests

func SkipCITests(t *testing.T)

func SkipMemIntensiveTests

func SkipMemIntensiveTests(t *testing.T)

func SkipTimedTests

func SkipTimedTests(t *testing.T)

func TestTpRtn

func TestTpRtn(tptoken uint64, errstr unsafe.Pointer, tpfnparm unsafe.Pointer) int

Routine to perform a TP transaction (TP callback routine)

Note - below export statement is needed so this routine is known.

func VerifyLockExists

func VerifyLockExists(lockvalidation []byte, errors *int, giveerror bool, t *testing.T) bool

Routine to validate a lock exists - or not

Types

This section is empty.

Jump to

Keyboard shortcuts

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