• Dmitry Rubinstein
  • 30 November 2016
  • Comments

Elixir: Your package should survive in production!

You are very good person! Great person! You have just created you first (or second, or third, etc.) package in Elixir language and published it to the Hex. You are nice enough to follow some conventions. At least this one.

The work is done, isn’t it? You’ve done everything as in official tutorial™. What problems can it lead to? “Nothing” is wrong answer…

Do you want to know why? Well… I’ll try to answer this question.


  • Dmitry Rubinstein
  • 26 October 2016
  • Comments

Elixir: Testing without starting supervision tree

Imagine simple situation: you need to test some of your code modules, but you application is made in the best qualities and traditions of OTP framework. When your tests start, your application starts also, and supervision tree starts also, and everything is running in the same environment with your tests!

Thus, you get a bench of problems:

  • Your dev and test environments mix together;
  • You can’t test processes, that are registered with names, because they are already started by your supervision tree;
  • You can’t perform unit testing, because you are not really sure, that this testing would be really unit.

The solution is simple: Divide and conquer!