Testing Concurrent Requests and Race Conditions
A race that appears once a week is a test waiting to be made deterministic.
Read articleTopic
A race that appears once a week is a test waiting to be made deterministic.
Read articleTurn a timing-dependent two-client race into a repeatable set of mock responses.
Read articleTwo tickets, two worktrees, both green. The merge kept the second agent's hunk in the shared registry and dropped the first agent's flag; no test failed, because neither suite asserted the shared file's full contents.
Read articleTwo concurrent withdrawal requests both read $100, both passed the check, both wrote $0. The agent had added FOR UPDATE to stop double-spend. It just put the lock on the wrong side of the read.
Read articleTwo clients PUT the same resource and the last write silently wins. The HTTP fix is conditional requests with ETag, If-Match, and a 412 that tells the client to re-fetch and retry. Here is the exact state table and the OpenAPI that makes codegen and AI agents handle conflicts correctly.
Read article