Home / Companies / InfluxData / Blog / Post Details
Content Deep Dive

Reproducing a Flaky Test in Go

Blog post from InfluxData

Post Details
Company
Date Published
Author
Mark Rushakoff
Word Count
2,346
Company Posts That Month
19
Language
English
Hacker News Points
2
Post removed?
No
Summary

A well-written Go developer, Mark Rushakoff, shares his experiences on reproducing flaky tests in Go. Flaky tests are nondeterministic tests that fail occasionally due to various reasons such as data order, timing issues, or concurrency problems. To reproduce a flaky test, one must focus on the exact package and test that failed, use -run flags to isolate the failing test, increase the count of iterations with -count=1 to ensure multiple runs, and run the test in a loop until it reproduces within a minute or less. If still unable to reproduce, tools like data race detector, cpulimit for CPU throttling, and adjusting GOMAXPROCS can help identify the root cause of flakiness.

Trends Found in this Post

No tracked trend matches for this post yet.

Use This Data

Use this post, company, and trend context to find content marketing opportunities, perform competitive analysis, or address product feature gaps via the Plushcap MCP server or the Plushcap API.