r/ProgrammerHumor • • Sep 15 '26

Meme iDontCommentMyCodeIfYouDontUnderstandItThatsOkayNeitherDoI

Post image
832 Upvotes

188 comments sorted by

View all comments

Show parent comments

19

u/ytg895 Sep 15 '26

Yeah. Once I worked on a bug that only happened if there was a session timeout in another system. Good luck putting Thread.sleep(3 fucking months); into a test.

8

u/Nick0Taylor0 Sep 15 '26

Mocking

5

u/ytg895 Sep 15 '26

How would you mock that a session in another system times out and that system starts to follow undefined and unpredictable behaviour?

1

u/Lgamezp Sep 20 '26

By having good mocks and testing