2min chapter

Elixir Wizards cover image

Kate Rezentes on GenServers at Simplebet

Elixir Wizards

CHAPTER

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

Get the Snipd
podcast app

Unlock the knowledge in podcasts with the podcast player of the future.
App store bannerPlay store banner

AI-powered
podcast player

Listen to all your favourite podcasts with AI-powered features

Discover
highlights

Listen to the best highlights from the podcasts you love and dive into the full episode

Save any
moment

Hear something you like? Tap your headphones to save it with AI-generated key takeaways

Share
& Export

Send highlights to Twitter, WhatsApp or export them to Notion, Readwise & more

AI-powered
podcast player

Listen to all your favourite podcasts with AI-powered features

Discover
highlights

Listen to the best highlights from the podcasts you love and dive into the full episode