- All playbooks
- Slow tests
- Run slow independent Go tests and subtests in parallel
Run slow independent Go tests and subtests in parallel
Real waits in independent cases overlap, so their time stops adding up one case after another.
Company examples
How OpenClaw used this technique
Read what OpenClaw changed and follow the original sources.
Run slow independent Go tests and subtests in parallel
Real waits in independent cases overlap, so their time stops adding up one case after another.
In one focused local race run of the two HTTP test groups, time went from 88.498 s to 42.304 s. Source
- Use it when
- Slow Go tests or table-driven subtests that each own their config, server, temp tree and store run serially because none calls t.Parallel().
- Before applying it
- Only cases that own their state run in parallel; cases that reuse a store stay sequential, and a test drops t.Setenv before it can call t.Parallel().
Company Playbooks
- Read Anthropic’s playbookRun only affected tests
- Read DoorDash’s playbookRun build and test in parallel, sharded across CI agents
- Read Linear’s playbookBenchmark the same job on faster hardware
- Read Mastra’s playbookStarSling runners for the slowest test workflow
- Read OpenAI’s playbookRank CI fixes by the minutes they save
- Read Ramp’s playbookType-check with a native checker
- Read Shopify’s playbookLet an agent iterate against one CI metric
- Read Spotify’s playbookBuild arm64 on native arm64 runners
- Read Stripe’s playbookRun only the tests a change can reach
- Read Uber’s playbookBuild the merge-queue speculations most likely to be needed
- Read OpenClaw’s playbookSelect only the tests and proofs a change can affect