Uncached Go tests: avoid flaky tests

jotafeldmann

Jota Feldmann

Posted on February 27, 2020

Uncached Go tests: avoid flaky tests

So, crazy about your integration tests with Go?

I was totally crazy testing my endpoints, and, for hours, I didn't know why some tests were flaky in my CI environment.

But since Go 1.10 tests are cached.

To avoid cache, you can use:

go test -count=1

Thanks @marciorodrigues and that issue.

💖 💪 🙅 🚩
jotafeldmann
Jota Feldmann

Posted on February 27, 2020

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related