testutil

package
v1.1.7 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func StartLinkTest

func StartLinkTest(checker *LinkStateChecker, id string, uf channel.UnderlayFactory, assertions *require.Assertions) channel.Channel

Types

type LinkStateChecker

type LinkStateChecker struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func NewLinkChecker added in v0.32.0

func NewLinkChecker(assertions *require.Assertions) *LinkStateChecker

func (*LinkStateChecker) HandleFault

func (self *LinkStateChecker) HandleFault(msg *channel.Message, _ channel.Channel)
func (self *LinkStateChecker) HandleLink(msg *channel.Message, ch channel.Channel)

func (*LinkStateChecker) HandleOther

func (self *LinkStateChecker) HandleOther(msg *channel.Message, _ channel.Channel)

func (*LinkStateChecker) RequireNoErrors

func (self *LinkStateChecker) RequireNoErrors()
func (self *LinkStateChecker) RequireOneActiveLink() *TestLink

type MessageCollector

type MessageCollector struct {
	// contains filtered or unexported fields
}

func AcceptControl

func AcceptControl(id string, uf channel.UnderlayFactory, assertions *require.Assertions) (channel.Channel, *MessageCollector)

func NewMessageCollector

func NewMessageCollector(id string) *MessageCollector

func (*MessageCollector) HandleReceive

func (self *MessageCollector) HandleReceive(m *channel.Message, ch channel.Channel)

func (*MessageCollector) Next

func (self *MessageCollector) Next(timeout time.Duration) (*channel.Message, error)

func (*MessageCollector) NoMessages

func (self *MessageCollector) NoMessages(timeout time.Duration, req require.Assertions)
type TestLink struct {
	Id         string
	Src        string
	Dest       string
	FaultCount int
	Valid      bool
}

type UnderlayFactoryWrapper

type UnderlayFactoryWrapper struct {
	// contains filtered or unexported fields
}

func NewTimeoutUnderlayFactory

func NewTimeoutUnderlayFactory(factory channel.UnderlayFactory, timeout time.Duration) *UnderlayFactoryWrapper

func (*UnderlayFactoryWrapper) Create

func (self *UnderlayFactoryWrapper) Create(timeout time.Duration, tcfg transport.Configuration) (channel.Underlay, error)

Jump to

Keyboard shortcuts

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