Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Ask HN: How can I write a test to check for race conditions?
2 points by samuel246 on Sept 28, 2023 | hide | past | favorite | 2 comments
In a transactional system, race conditions typically occur rarely. It becomes challenging to write a test script specifically designed to check for race conditions.

Do you write tests for such cases, or is it common practice to ignore these infrequent occurrences?



In Go, this is available. Never used it before but could be worth digging into the details for some ideas

https://go.dev/doc/articles/race_detector


Eager for a reply to this questio, as I have the same.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: