testutil

package
v0.0.0-...-a6ee7d6 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var LeakOptions = []goleak.Option{
	goleak.IgnoreTopFunction("google.golang.org/grpc.(*ccBalancerWrapper).watcher"),
	goleak.IgnoreTopFunction("google.golang.org/grpc.(*ccResolverWrapper).watcher"),
	goleak.IgnoreTopFunction("google.golang.org/grpc.(*addrConn).createTransport"),
	goleak.IgnoreTopFunction("google.golang.org/grpc.(*addrConn).resetTransport"),
	goleak.IgnoreTopFunction("google.golang.org/grpc.(*Server).handleRawConn"),
}

LeakOptions is used to filter the goroutines.

Functions

func Eventually

func Eventually(re *require.Assertions, condition func() bool, opts ...WaitOption)

Eventually asserts that given condition will be met in a period of time.

Types

type WaitOp

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

WaitOp represents available options when execute Eventually.

type WaitOption

type WaitOption func(op *WaitOp)

WaitOption configures WaitOp.

func WithTickInterval

func WithTickInterval(tickInterval time.Duration) WaitOption

WithTickInterval specify the tick interval to check the condition.

func WithWaitFor

func WithWaitFor(waitFor time.Duration) WaitOption

WithWaitFor specify the max wait duration.

Jump to

Keyboard shortcuts

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