AI-powered
podcast player
Listen to all your favourite podcasts with AI-powered features
Gene Servers - Can You Test That?
You can just call gen server stop and then you can give it a reason. This actually is a little bit more dependent on how your supervisor is configured so if your supervisor is supposed to restart the process which I think is like the default behavior then your test would say gen server dot stop and that would kind of tell you that the gen server started back up again with a new process. For more resources on this particular subject there isI just checked a section in the testing elixir book by Jeffrey Matthias and Andre Liu party of test how to test a gen server. It's like a whole chapter of testing OTP but it might be like a section specifically dedicated to gen server.