testutil

package
v0.24.2 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LinkStateChecker added in v0.24.0

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

func StartLinkTest added in v0.24.0

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

func (*LinkStateChecker) HandleFault added in v0.24.0

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

func (*LinkStateChecker) HandleOther added in v0.24.0

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

func (*LinkStateChecker) RequireNoErrors added in v0.24.0

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
	Dest   string
	Failed 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