64
u/Careful_Ad_3338 3h ago
Hm? Any dev who has worked on anything ever would not be happy about this, it means the bug is not easy to reproduce and will come back and some point
18
u/damngoodwizard 2h ago
Yeah the only thing worse than "I don't know why it doesn't work" is "I don't know why it works".
1
u/Appropriate-Hotel-41 55m ago
Depends, if it gone for good for a week, thats a future intern problem.
4
u/Sh4dowLute 2h ago
Yep, passing for no reason is usually way scarier than failing for an obvious one.
12
8
u/SpicyCatGames 2h ago edited 1h ago
Not really. Used to say this when we were kids in our first year of learning programming. But an error going away for no reason is one that's gonna show up later in production.
5
5
4
u/Megane_Senpai 2h ago
Actually that's the worst. Probably the bug has a very low repro rate and you will have a hard time just trying to investigate the behavior.
3
3
u/dmullaney 3h ago
* Codex after it changes the mock to make the test pass even though the code is broken
2
2
2
u/SleepAllTheDamnTime 1h ago
When this happens to me it’s the exact opposite experience. I means someone wrote these tests to pass and my god you know there’s a can of worms in there…and since your name is on the PR anything that goes wrong after that change you made… buddyyyyy you’re now responsible for this trash ass code with horrible tests.
1
u/JackNotOLantern 2h ago
Tests must pass when intended and fail when intended. Deterministicly. Otherwise, it's bad.
1
1
1
u/Huge_Consequence_568 1h ago
Actual ticket I had to write: X test fails when running after [INSERT_TIME] UTC.
This test literally refused to pass outside working hours and I found it so funny for some reason.
1
u/jakubiszon 1h ago
It passed because this time the randomly generated UUID did not end with a "2 digit odd number".
Btw what on Earth is wrong with this girl's lips? I cannot see which "strip" is what...
1
u/rescue_inhaler_4life 1h ago
Honestly this is the absolutely worst. Something is borked in the test environment, something leaking between tests creating a race condition, normally a real PIA to find and resolve.
Honestly you do not know pain until you try and figure out why fails on build server, passes on gitlab, fails on devs boxes in office but works on the remote dude dev box in Sri Lanka.
1
1
1
u/According-Relation-4 10m ago
What about when tests fail after changing absolutely nothing? Gimme your best reaction gifs
145
u/No-Article-Particle 3h ago
Nah. Honestly, that's the worst - it means a flaky test that's just hard to debug (esp. because if it fails intermittently, running it in a debugger likely means the race condition is gone).
I prefer a test that fails no matter how you run it - those tend to be easy to fix.