← Back to sandbox
Backend & API Advanced 3 possible tests

Race Conditions

A publish endpoint with no concurrency protection. Click the buggy button twice in rapid succession to trigger a duplicate write. The safe endpoint uses a lock and existence check.

What is this?

A race condition occurs when two concurrent operations read the same state and both decide to write, producing duplicate or corrupted results. This is common in publish/create flows where the check-then-act sequence is not atomic.

What is hidden here

BugClick "Publish (Buggy)" twice rapidly → 2 duplicate records appear in the list
CorrectClick "Publish (Safe)" twice → second click is deduplicated by the lock
ResetClear published list between test runs

Publish Card

Tip: click "Publish (Buggy)" twice as fast as possible to trigger the race condition

Published Count
Published List
Suggested Test Inputs
  • Click Publish (Buggy) twice as fast as possible
  • Check if the same card appears twice in the published list
  • Try the safe endpoint — it should deduplicate even on fast clicks