Test initialization takes more time than expected
I'm doing a green field project in Ash and it's been great so far. I'm feeling a bit lost when it comes to tests and their speed though. It takes about six seconds to run the test suite consisting of six tests, and that's enough for me to lose focus and start doing something else. I measure this by running
time mix test
. Elixir's test runner says it takes 0.5 seconds to run all tests, so something happens before the test runner starts. Right now my hypothesis is that Getting extensions in current project...
and Running setup for AshPostgres.DataLayer...
takes the rest of the time. Is there some way to speed up the things going on before the test suite runs?2 Replies
I think I found the part that takes long time, it's
ash.setup
running before the test suite. It's probably a good thing to run it before the tests, but I'll take a chance to minimize the cycle time.
Thank you for listening to my rubber ducking!I often comment out the
test
alias when working on tests and I'm sure ash.setup
doesn't need to be run.