3 ms·
> You can't seriously tell me client retry doesn't have a unit test which ensures the retry back off behaviour That wouldn't be a unit test - that's more like
by bluerooibos 1mo ago
> You can't seriously tell me client retry doesn't have a unit test which ensures the retry back off behaviour
That wouldn't be a unit test - that's more like an end-to-end or integration test.
Have you ever worked anywhere that had perfect test coverage? It just doesn't happen, nor is it possible unless you're building a calculator app or todo list.
- hirvi74 1mo agoMy employer has 0% test coverage lol. I've begged and pleaded, but the claim is that "risk is low" and "that's what QA is for." Hell, I've complained to senior management about how there are senior devs that forgo backend validation. It's truly Hell in the trenches sometimes. Some days, I would seriously rather work at Wendy's.
- nnx 1mo ago> Some days, I would seriously rather work at Wendy's. Narrator: He would not.
- hirvi74 1mo agoIf such a job paid even half as much, I would quit today. I can continue to program computers as a hobby. Occupational programming has essentially eroded my passion over the years. Money is not important to me insofar as I have enough to live an average life. I don't need anymore than that.
- inigyou 1mo agoJust write the tests. It's your job, not your employer's.
- hirvi74 1mo agoIt's their code, not mine. If they don't want us writing tests, then so be it. I get paid either way.
- bluerooibos 1mo agoYou're the engineer, not them - you're being paid to write code that ideally doesn't break - it's your job to explain that tests benefit them. There's very little excuse not to add test coverage as you go along these days given an LLM could help write most in a flash. Or, don't tell them and do it anyway. It'll make your own life 100x easier, unless you enjoy the stress of bug fixing and responding to incidents where you've broken something. Writing code without tests because it takes too long is like running a car engine without ever bothering to change the oil - it'll run for a bit, and eventually fail catastrophically.
- inigyou 1mo agoIt's not your job to explain tests are good. It's your job to have tests.
- cube00 1mo agoI'd disagree it needs end-to-end. Testing that proper sleep calls are made followed by an error can be done in unit tests. Unit tests already mock network calls so create mocks to return errors instead. https://news.ycombinator.com/item?id=49384968 https://news.ycombinator.com/item?id=49384968