We can't find the internet
Attempting to reconnect
Something went wrong!
Hang in there while we get back on track
Keeping Oban's time units explicit
Oban's Lifeline and Pruner accept raw integers in different units: rescue_after is milliseconds, while max_age is seconds.
On current Oban releases, ...
Catching GenServer.call/3 timeout exits
GenServer.call/3 does not return {:error, :timeout} when the server misses its deadline. It exits the caller instead....
Keeping self() straight in on_exit callbacks
An on_exit callback looks like it belongs to the test that registered it, but self() inside the callback is not the test PID:...
Clearing inherited variables in System.cmd
Passing env: [] to System.cmd/3 does not clear the child environment....
Running Task.async_stream/3 for side effects
Calling Task.async_stream/3 does not start any tasks:...
Keeping timeouts active while tracing tests
A test can stop timing out when you rerun it with --trace:...
Starting only what a FLAME runner needs
When FLAME boots a remote runner, it starts your application there, so your application has to decide which supervision children belong on that runner...
Keeping stale gzip assets out of Phoenix tests
I spent too long debugging a LiveView hook in ElixirDrops because the browser kept running old JavaScript. The source and freshly built app.js were co...
Let ExUnit shut down your test processes
Start test-owned processes with start_supervised!/1 so ExUnit waits for them to shut down before running your cleanup callbacks....
Put `phx-change` inputs inside a form
Put every input with its own phx-change binding inside a form. Outside one, the markup looks wired, but LiveView will not send the event....
Check the exit status from `System.cmd/3`
Check the exit status when wrapping an external command. A nonzero exit from the program does not make System.cmd/3 raise....
Make `capture_log` assertions test-specific
Do not assert on generic text in logs captured by async tests....
Avoid `File.cd!/2` in async tests
Do not use File.cd!/2 to isolate filesystem work in concurrent tests. Its callback looks scoped, but the current working directory belongs to the enti...
Build sequence diffs with List.myers_difference/2
Use List.myers_difference/2 to turn two sequences into an edit script without adding a diff dependency....
Capture warnings with Code.with_diagnostics/2
Use Code.with_diagnostics/2 when warnings and errors need to become structured data instead of terminal text....
copied to clipboard