slowtests

command
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2026 License: Apache-2.0 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

Command slowtests reads `go test -json` on its input, prints what go test prints without -json (the output of the tests that fail, the build errors, a line per package), and fails when a test fails or when a top-level test took longer than -max: tests stay fast, and a slow one is caught the day it slows down. A package that fails while none of its tests did (its test binary ended in the middle: a panic in a goroutine after its test ended, an os.Exit, a kill) gets its raw output printed, and the tests it was running named.

Linux is the reference: where the push check runs, -max fails. On CI (when CI is set), beside the other parts of go tool task test (DJINN_TEST_BESIDE, set by tools/testall: the end-to-end tests' browsers share the cores) or on another system where a process costs ten times more (a test spawning git takes 0.7 s on Linux and 7 s on the Windows runner, the same test), a test over -max is reported and fails only over twice -max (or -max-elsewhere): a test that hangs or grows tenfold is still caught there. `go tool task test-go` alone, on Linux, holds the strict limit.

go test -json ./... | go run ./tools/slowtests

A test that must stay slow goes in allowed, with why: the list stays empty unless a test has a reason.

Jump to

Keyboard shortcuts

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