utils

package
v0.8.0-pre Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const EnvAmTestRunner = "AM_TEST_RUNNER"

Variables

View Source
var (
	RelsNodeWorkerStruct = am.StructMerge(ssnode.WorkerStruct, ss.States)
	RelsNodeWorkerStates = am.SAdd(ss.Names, ssnode.WorkerStates.Names())
)
View Source
var (
	ConnInit sync.Mutex
)

Functions

func NewCustom added in v0.8.0

func NewCustom(t *testing.T, states am.Struct) *am.Machine

NewCustom creates a new machine with custom states.

func NewCustomRpcWorker added in v0.8.0

func NewCustomRpcWorker(t *testing.T, states am.Struct) *am.Machine

NewCustomRpcWorker creates a new worker with custom states.

func NewNoRels

func NewNoRels(t *testing.T, initialState am.S) *am.Machine

NewNoRels creates a new machine without relations between states.

func NewNoRelsRpcWorker added in v0.8.0

func NewNoRelsRpcWorker(t *testing.T, initialState am.S) *am.Machine

NewNoRelsRpcWorker creates a new RPC worker without relations between states.

func NewRels

func NewRels(t *testing.T, initialState am.S) *am.Machine

NewRels creates a new machine with basic relations between ABCD states.

func NewRelsNodeWorker added in v0.8.0

func NewRelsNodeWorker(t *testing.T, initialState am.S) *am.Machine

NewRelsNodeWorker creates a new Node worker machine with basic relations between ABCD states.

func NewRelsRpcWorker added in v0.8.0

func NewRelsRpcWorker(t *testing.T, initialState am.S) *am.Machine

NewRelsRpcWorker creates a new RPC worker machine with basic relations between ABCD states.

func RandListener

func RandListener(host string) net.Listener

RandListener creates a new listener on an open port between 40000 and 50000. It allows to avoid conflicts with other tests, using predefined addresses, unlike using port 0.

func RandPort

func RandPort(min, max int) string

Types

This section is empty.

Jump to

Keyboard shortcuts

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