warmtest

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: 5 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 warmtest is the conformance suite of warm.Watcher.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

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

Run checks the contract: a change is reported with its repository or with "", and Watch returns nil when ctx ends.

Types

type Clock

type Clock struct {
	// contains filtered or unexported fields
}

Clock is a manual check.Clock. Fire ends every wait. A Fire with no wait pending ends the next wait at once.

func (*Clock) After

func (c *Clock) After(time.Duration) <-chan time.Time

func (*Clock) Fire

func (c *Clock) Fire()

func (*Clock) Now

func (c *Clock) Now() time.Time

type Harness

type Harness struct {
	Watcher warm.Watcher
	Repo    string
	Change  func()
}

Harness is a watcher over the repository Repo. Change makes the watcher see a change of Repo, and leaves the watcher to report it once the clock fires. It may wait until the watcher has started.

type Impl

type Impl struct {
	New func(t *testing.T, clock *Clock) Harness
}

Impl builds the implementation under test. It must use clock for every wait.

Jump to

Keyboard shortcuts

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