~/talk

Don’t Be ‘Thread’-ened: Testing Multithreaded Code with Confidence

Talkat Euruko 2025 · 2025-09-18..09-19· [ruby, testing]
speakerdeck:vankiru
slides:none on file

Shows how separating core logic from threads — divide and conquer — turns about 80% of concurrency tests into simple single‑threaded specs, and tackles the remaining ~20% by replacing flaky sleeps with Ruby condition variables and concurrent-ruby CountdownLatch to wait for N events. Demonstrates method redefinition in tests to inject a latch without changing production code, producing deterministic CI‑friendly tests whose failures signal real bugs rather than timing luck.

AI-written summary · about

  1. 0:00Introduction
  2. 1:14Flaky tests in multithreading
  3. 3:00Ruby client for NATS
  4. 4:24Divide and conquer testing
  5. 5:29Testing thread loops with latches
  6. 7:35Concurrent Ruby for tests
  7. 9:21Metaprogramming to test
  8. 10:29Countdown latches advantages
  9. 10:54Testing versus visa process
~/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.