Several popular Elixir libraries use gen_statem internally, given it's very
useful for managing data over persistent connections. However Elixir's
default translations for Erlang log messages don't capture termination
reports from gen_statem. As a result, gen_statem terminations leave no
Currently, tests that use env variables can't be run async because the
environment is shared. My proposal is to introduce a with_env function that
will accept a function to execute and a mapping of params that the
functions in System will accept as env variables:
Now: System.put_env("PORT",
I would love to see a PR that implements translation for gen_statem, so we
can evaluate if it makes sense to merge it into Elixir.
On Wed, Mar 27, 2024 at 4:10 PM Cameron Duley
wrote:
> Several popular Elixir libraries use gen_statem internally, given it's
> very useful for managing data over
I don't see a strong need to make this part of ExUnit, especially because:
1. We should avoid mutating the global state in tests
2. We should avoid reading system environment variables in code (use
config/runtime.exs instead)
Those can add to their own suites if necessary. :)
On Wed, Mar 27,