Hacker News new | ask | show | jobs
by theowaway213456 4 days ago
Every time you write a test that handles some data, you write an assertion about how much data is handled?

Come on, this is such an easy thing to forget to test. Don't act like there is some magical testing strategy that would have caught this

2 comments

The most likely way I think you'd catch this in a test would be by accident, running some kind of long-running integration test for other purposes, and then finding the disk gets filled up in CI (or on a developer machine).
I'll acknowledge that this is probably not likely to get caught.

Integration testing could/should catch this, especially for a client side app.

A simple constraints is a good thing. "Our app shouldn't use more than 50mb of ram, or use 3gb of disk space."

load testing definitely should have caught this issue.