testutil

package
v4.3.3 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func UntilConnect

func UntilConnect(t TestingT, a int, d time.Duration, addr string)

Continues to attempt connecting to the specified tcp address until either a successful connect or attempts are exhausted

func UntilPass

func UntilPass(t TestingT, attempts int, duration time.Duration, callback func(t TestingT)) bool

Return true if the test eventually passed, false if the test failed

Types

type TestResults

type TestResults struct {
	T        TestingT
	Failures []string
}

func (*TestResults) Errorf

func (s *TestResults) Errorf(format string, args ...interface{})

func (*TestResults) FailNow

func (s *TestResults) FailNow()

func (*TestResults) Report

func (s *TestResults) Report(t TestingT)

type TestingT

type TestingT interface {
	Errorf(format string, args ...interface{})
	FailNow()
}

Jump to

Keyboard shortcuts

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