Going Multi-Node with ExUnit
summary
Shows how to make ExUnit run tests across BEAM nodes by monkey‑patching the runner at runtime: changed spawn to node.spawn and use rpc.multi_call to compile tests on every node; modifies test_helper .exs to redefine the runner and compiler so each node loads test code into its code server. Benchmarks: 19.1s → 7.2s → 3.7s (series, single‑node parallel, three‑node cluster). It works for CPU‑bound, pure tests but hits code server limitations and needs extra work for stateful apps.
AI-written summary · about
chapters (21)
- 0:00Intro
- 0:46Theory
- 2:56Parallel
- 5:51Picture
- 8:05Distributed
- 10:53Benchmarks
- 13:23The Code Server
- 14:54Anonymous Functions
- 15:37Beam Files
- 17:06Parallel or Distributed
- 17:27Changing the Runner
- 20:05Undefined function error
- 21:15Code servers
- 23:10Remote code loading
- 27:45ExUnit compiler
- 28:50RPC multicall
- 30:11Real Code
- 30:52Benchmark
- 31:20Performance
- 33:50Modules
- 35:08Questions
related talks
42mThe Soul of Erlang and Elixir
20mDistributed Erlang lessons from Livebook
35mGoing Multi-Node
40mSo I used Erlang...is my system as scalable as they say it'd be?
38mDemos and Lightning Talks
22mProgramming the worldwide elastic supercomputer with Unison
36mStateful property-based testing: with a game logic case study
23mBEAM-style Execution Tracing for Perl
