vistest

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2026 License: MIT Imports: 7 Imported by: 0 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

Overview

Package vistest helps test code that uses vis: each test gets its own instance, so tests that change knobs can run in parallel.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Ring

func Ring(t testing.TB, n int, opts ...vis.InstanceOption) []*vis.Instance

Ring starts a fleet of n instances of one service, with opts, joined into a ring over an in-memory network before it returns, and stops them when the test ends. They are named i0, i1 and on. Inside testing/synctest the ring's gossip, leases and cooldowns run in no time.

func Set

func Set(t testing.TB, in *vis.Instance, k vis.Int, v int)

Set pins an Int knob to v on in, as a person would, failing the test if it can't.

func Start

func Start(t testing.TB, opts ...vis.InstanceOption) *vis.Instance

Start gives the test its own instance, with opts. Use it instead of the default instance, which every test in the process shares.

Types

This section is empty.

Jump to

Keyboard shortcuts

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