
Kate Rezentes on GenServers at Simplebet
Elixir Wizards
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.
00:00
Transcript
Play full episode
Remember Everything You Learn from Podcasts
Save insights instantly, chat with episodes, and build lasting knowledge - all powered by AI.