~/talk

Testing Asynchronous OTP

Talkat ElixirConf EU 2021 · 2021-09-09..09-10· [elixir-and-erlang, testing]
links:none on file
slides:none on file

Practical techniques for testing async BEAM code: treat stateful processes as black boxes or split into a pure functional core plus a thin GenServer wrapper; start test children with start_supervised so they shut down cleanly; observe background work by sending notifications and using assert_receive or replace external calls with mocks/test doubles; make periodic actions triggerable or run in manual mode; only test crash behavior when cleanup must happen; consider the subs tool for property‑style failure simulation of supervision trees.

AI-written summary · about

  1. 0:00Intro
  2. 1:00Community
  3. 1:18Community Careers
  4. 1:31Testing a Lecture
  5. 2:36What is Hard
  6. 3:29Global Resources
  7. 4:09System Failures
  8. 5:51Lessons
  9. 7:26Ideas not recipes
  10. 8:28Acceptance
  11. 9:07Outline
  12. 9:42Stateful Processes
  13. 10:05Rolling Average Server
  14. 11:08Data Structure
  15. 12:15Testing Changes in State
  16. 12:32Unit Testing
  17. 16:08Data Structures
  18. 17:45sysgets
  19. 17:55rollingaverage
  20. 19:42OTP behaviors
  21. 20:45Supervisor
  22. 21:26Supervisor semantics
  23. 23:03Testing background code
  24. 23:29Example
  25. 23:44How do I know when it is done
  26. 23:58Message Passing
  27. 25:26Search Receive
  28. 27:02Mock Example
  29. 28:22Periodic Actions
  30. 28:41Weather Check
  31. 30:38Obstruction
  32. 33:31Singleton
  33. 35:44Resilience
  34. 36:07Unexpected failures
  35. 37:24Disk memory leak
  36. 39:00Supervision trees
  37. 39:30Manual testing
  38. 40:03Subs
  39. 40:56Testing is hard
  40. 41:28Why do we test
  41. 42:59The dirty test
  42. 43:30Testing is not automated
~/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.