Discussion about this post

User's avatar
Fayaz Bin Salam's avatar

Reliably useful issue — the recurring theme across these roundups is that most flaky-test pain isn't in the assertions, it's in test data and environment setup. Half the "intermittent failure" tickets I've seen resolved to two suites sharing a database and disagreeing about who cleans up. The unglamorous fix is usually giving each suite its own throwaway store instead of a shared server nobody owns; for Node projects I've used a file-backed JSON db for that (https://github.com/p32929/fjsondb) — delete the file, state is gone, no container to wait on. Not a production datastore, but for fixtures it removes a whole class of "works on my machine".

No posts

Ready for more?