test

package
v0.0.0-...-e4d621a Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2025 License: Apache-2.0 Imports: 9 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssertEvents

func AssertEvents(t *testing.T, actualCh any, expected ...any) bool

AssertEvents asserts that the expected list of events was received on the actual channel and no unexpected events are enqueued there

func AssertForefrontEvents

func AssertForefrontEvents(t *testing.T, actualCh any, expected ...any) bool

AssertForefrontEvents asserts that the expected list of events was received on the actual channel

func Context

func Context(t *testing.T) context.Context

Context returns a new testing context.

If your code relies on the values normally injected into the context by Tool or server, it's a good idea to test it with TestContext to provide adequate replacements.

func ContextWithTimeout

func ContextWithTimeout(t *testing.T, timeout time.Duration) context.Context

ContextWithTimeout is a version of TestContext with a timeout.

If the timeout expires, the test context is closed with context.DeadlineExceeded.

func Group

func Group(t *testing.T) *parallel.Group

Group returns a parallel.Group with a testing context.

If your code relies on the values normally injected into the context by Tool or Server, it's a good idea to test it with TestGroup to provide adequate replacements.

If the group finishes with an error other than context.Canceled, the test is failed.

func GroupWithTimeout

func GroupWithTimeout(t *testing.T, timeout time.Duration) *parallel.Group

GroupWithTimeout is a version of TestGroup with a timeout.

If the timeout expires, the test context is closed with context.DeadlineExceeded.

Types

This section is empty.

Jump to

Keyboard shortcuts

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