~/talk

Simulation Testing for Background Jobs

Talkat RubyConf TH 2026 · 2026-01-31..02-01· [testing, ruby-on-rails]
slides:none on file

Chaotic Job is a Ruby gem that makes retry behavior testable by replaying enqueued jobs in production order, collapsing time and avoiding the PerformingEnqueuedJobs lie. It provides perform_all_jobs and time-bounded flush helpers, a glitch.inject TracePoint layer to inject retriable errors, a macro that generates one test per observed failure point, and a race-tester that samples 200 deterministic interleavings. It is extracted from the acidic_job test suite and is proven useful for finding retry and race bugs in durable Active Job workflows.

AI-written summary · about

  1. 0:00Introduction
  2. 1:55Testing job retries matters
  3. 4:06Flaws in Rails retry helpers
  4. 7:02Retry testing with perform helpers
  5. 13:05Simulating job failures
  6. 15:14Glitches for controlled failures
  7. 20:12Declarative failure scenarios
  8. 21:16Testing all job failure points
  9. 24:48Race conditions between jobs
  10. 29:11Summary
~/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.