3 ms·
What do you mean testing with processes? I won't suggest these are the best written tests, but I test various processes, supervisors, etc like this: - https:/
by cpursley 3y ago
What do you mean testing with processes?
I won't suggest these are the best written tests, but I test various processes, supervisors, etc like this:
- https://github.com/cpursley/walex/blob/master/test/walex/supervisor_test.exs#L20 https://github.com/cpursley/walex/blob/master/test/walex/sup...
- https://github.com/cpursley/walex/blob/e13a9cbf9aca1a2a2d4ed0ec1841d00072990ac4/test/walex/database_test.exs#L45 https://github.com/cpursley/walex/blob/e13a9cbf9aca1a2a2d4ed...
- eclark 3y agoIf have an `Application` that starts processes that cache ecto state, or periodically write to db, etc, it's hard to test the whole process tree. Additionally Umbrella projects start all applications in the project with one config. All of those combined mean you have to change your code structure quite a lot to make that testing possible. Testing single processes is pretty easy. Making sure that two processes and ecto can tolerate failures, delays, etc requires too much.