flakesync

package
v0.0.0-...-14aa065 Latest Latest
Warning

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

Go to latest
Published: May 24, 2016 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cache

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

Cache caches test result lookups, and aggregates flakes in a single place. TODO: evict based on time. TODO: evict when issue filed. TODO: backfill to given time.

func NewCache

func NewCache(getFunc ResultFunc) *Cache

NewCache returns a new Cache.

func (*Cache) Flakes

func (c *Cache) Flakes() Flakes

Flakes lists all the current flakes, sorted.

func (*Cache) Get

func (c *Cache) Get(j Job, n Number) (*Result, error)

Get returns an item from the cache, possibly calling the lookup function passed at construction time.

type Flake

type Flake struct {
	Job
	Number
	Test
	Reason string
}

Flake records a single flake occurrence.

type Flakes

type Flakes []Flake

Flakes is a sortable list of flakes.

func (Flakes) Len

func (f Flakes) Len() int

func (Flakes) Less

func (f Flakes) Less(i, j int) bool

func (Flakes) Swap

func (f Flakes) Swap(i, j int)

type Job

type Job string

Job is a test job, e.g. "kubernetes-e2e-gce"

type Number

type Number int

Number is a run of a test job.

type Result

type Result struct {
	Job
	Number
	Pass bool

	StartTime time.Time
	EndTime   time.Time

	// test name to reason/desc
	Flakes         map[Test]string
	UnlistedFlakes bool // i.e., non-JUnit reported
}

Result records a test job completion.

type ResultFunc

type ResultFunc func(Job, Number) (*Result, error)

ResultFunc should look up the job & number from its source (GCS or wherever).

type Test

type Test string

Test is the name of an individual test that runs in a Job.

Jump to

Keyboard shortcuts

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