testutils

package
v0.0.0-...-35d28e4 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ErrorCode

func ErrorCode(err error) codes.Code

ErrorCode returns the error code for err if it was produced by the rpc system. Otherwise, it returns codes.Unknown.

func ErrorDesc

func ErrorDesc(err error) string

ErrorDesc returns the error description of err if it was produced by the rpc system. Otherwise, it returns err.Error() or empty string when err is nil.

func PollFunc

func PollFunc(clockSource *fakeclock.FakeClock, f func() error) error

PollFunc is like PollFuncWithTimeout with timeout=10s.

func PollFuncWithTimeout

func PollFuncWithTimeout(clockSource *fakeclock.FakeClock, f func() error, timeout time.Duration) error

PollFuncWithTimeout is used to periodically execute a check function, it returns error after timeout.

Types

This section is empty.

Jump to

Keyboard shortcuts

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