Documentation
¶
Overview ¶
This is for test fixtures only.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DropSource ¶
func MakeMetric ¶
MakeMetric provides a way to build a metric for tests. Hopefully over time this will be used more, bringing more consistency to tests.
func NewAdvancingClock ¶
NewAdvancingClock attaches a virtual clock to a context which advances at full speed (not wall speed), and a cancel function to stop it. The clock also stops if the context is canceled.
func NextStep ¶
NextStep will advance the supplied clock.Mock until it moves, or the context.Context is canceled (which typically means it timed out in wall-time). This is useful when testing things that exist inside goroutines, when it's not possible to tell when the goroutine is ready to consume mock time.