dispatchtest

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2026 License: MIT Imports: 11 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 dispatchtest is the conformance suite of dispatch.Dispatcher. It plays the manager: it stores each request as open and dispatches it, and it plays the runner through the Receive function of the implementation.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(t *testing.T, impl Impl)

Run runs the suite against the implementation that impl.New returns.

Types

type Harness

type Harness struct {
	Dispatcher dispatch.Dispatcher
	// Receive blocks until a runner of repo gets a request and returns it. It returns false when ctx ends first.
	Receive func(ctx context.Context, repo string) (runnerproto.Request, bool)
}

Harness is an implementation wired to a runner of each repository that New named.

type Impl

type Impl struct {
	New func(t *testing.T, store check.Store, repos []string) Harness
}

Impl builds the implementation under test over store, with one runner for each of repos.

Jump to

Keyboard shortcuts

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