ETS as a test server side session store


I have a custom Redis based server side session store and to get it working in testing without mocks I made a store by writing some temporary json in the file system, it works but its not amazing and definitely not concurrent.

This got me thinking, would the ETS store (or some other solution) be more suitable for this case and once again open up concurrent testing?

EDIT: Didn’t need the test store at all, Plug.Conn handles test sessions for us before it reaches the store. :man_facepalming:


Definitely avoid any and all 3rd party software and services as much as you can in your test code!

That being said, yes, ETS should work just fine in tests. Admittedly I haven’t done but I am not seeing any obvious obstacles.