Billzabob
Unit tests are randomly timing out
Our team is having some flaky unit tests that we’re really struggling to track down. Every once in a while a random unit test will time out. We have increased the depth of the stack trace in hopes of tracking it down but it’s still all over the place. We’d love some help here ![]()
A lot of the time they end with :error_handler.undefined_function/3 but it’s always deep within library code like Phoenix or Absinthe, which seems super strange.
Here are some of the stack traces we’re seeing:
Most Liked
al2o3cr
I don’t have the foggiest idea what this could be - but based on those stacktraces, I noticed an interesting thing.
Two of them point to code:ensure_loaded in error_handler.erl
AND
There’s this PR from Jose (released in OTP26, according to Github tags) that specifically mentions “contention on the code_server”:
https://github.com/erlang/otp/pull/6736
That middle one in prim_inet.recv0 doesn’t fit that theory, tho ![]()
Unrelated to the above: is there anything unusual about the performance of the machines that CI is running on? I’ve seen weird stuff like this happen when running on “burstable” instances (when the CI instance runs out of CPU or IOPS), though you mention it also happening locally.
Popular in Questions
Other popular topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #advent-of-code
- #elixirconf-us
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #security
- #performance












