mirror of
https://github.com/jcreek/CosmicClash.git
synced 2026-09-11 08:23:45 +00:00
270ab00c52
Races 5 concurrent HeartbeatQueueTicket calls, all at the same expected revision, against a real PostgreSQL instance -- a genuinely plausible client scenario (slow-response retry, duplicate tab/process), and one the existing sequential stale-revision test can't exercise since it only calls the second heartbeat after the first has already committed. Asserts exactly one wins, the durable revision ends at exactly 1 (not higher, which a stale winner slipping through would produce), and every loser fails cleanly rather than hanging or returning a raw serialization error. Stable across 6 runs with -race, plus the full integration and unit suites.