3 ms·
Ask HN: How can I write a test to check for race conditions?
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?
- mojomark 3y agoEager for a reply to this questio, as I have the same.
- syndicatedjelly 3y agoIn 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 https://go.dev/doc/articles/race_detector