Testing "seam" in Elixir

We encountered some indeterministic failures from patch, the error is about some supervisor stopping or crashing from the package (if I come across again I will update here)

Aside from that, it is very difficult to find the proper interface of a module since there is no behaviour to implement. Sometimes, leading to very messy code and monkey patching way too high instead of closer to where the dependency needs to actually change. Monkey patching randomly just because they can.

Personally, I would avoid patch package and stick to Mox or anything similar that requires to define a behaviour/interface for the dependencies.

2 Likes