~/talk

Bye‑bye Race Conditions — Detect Them Before Our Users!

TalkinFrenchat Devoxx France 2024 · 2024-04-17..04-19· [concurrency, testing]
slides:none on file

Shows how to detect front-end race conditions by applying property-based fuzzing to a React autocomplete. It injects scheduler-controlled promise reordering into mocked API calls, uses fast-check with Jest to randomize and replay response orders and produce a shrunk counterexample where three overlapping requests return out of order and break suggestions. Presents fixes (request cancellation, sequence IDs, or libraries like React Query) and demonstrates deterministic reproduction via seeds so bugs are found before users encounter them.

AI-written summary · about

  1. 0:00Race conditions intro
  2. 3:12Definition and risks
  3. 5:37React example
  4. 8:07Testability issues
  5. 13:21Property-based testing with fast-check
  6. 18:16Advanced random generation
  7. 21:24Solutions and fixes
  8. 24:28Summary and best practices
  9. 26:16Q&A
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.