~/talk

Taming Flaky Specs: Diagnosing Test Failures in Ruby

Talkat RubyConf India 2024 · 2024-11-29..11-30· [testing, ruby-on-rails]
name:Sriram V
links:none on file
slides:none on file

Checklist and concrete fixes for flaky Ruby specs: identifies that about 50% of flakiness stems from inconsiderate assertions (count-based job checks, exact-time equality), shows how unstubbed network calls reveal themselves by turning off the internet, explains Time.zone vs local time problems and when to use time freezing or Rails time helpers, warns about mixing transactional and non-transactional tests, demonstrates how mis-set Sidekiq modes break order-dependent runs, and provides a small script + randomized CI log replay to reproduce and isolate failures.

AI-written summary · about

  1. 0:00Introduction to flaky specs
  2. 1:42Why flaky specs are interesting
  3. 3:08Goal of debugging flaky specs
  4. 3:29Inconsiderate assertions explained
  5. 5:20Unstubbed network calls issue
  6. 6:47Time zone confusion in tests
  7. 11:06Aftereffects of non-transactional tests
  8. 12:54Misuse of test environment helpers
  9. 16:13Object pollution in Ruby
  10. 19:40Summary and conclusion
~/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.