Closed toranb closed 5 years ago
Well funny enough all I needed to do was move the LocalCluster.start
line to the only test that needed it. For some odd reason I thought reading the docs for LocalCluster that you needed to have this line run before ExUnit.start ... seems not?
https://github.com/toranb/elixir-budget/commit/b657a1824dbc9db2f6ea4bf5ce62460173e4b423
Today I was migrating a tiny example Phoenix app over from ets and everything worked as expected thanks to the great docs and human friendly source so thank you for this great project!
I did bump into one issue with my test helper for more e2e cluster test scenarios because I'm running LocalCluster before ExUnit right now.
The error message I got was related to multi node as shown below.
I did some hunting around the test code for Cachex and found this handy Helper method.
The question I have is this -would it be possible to omit the rpc call like I see above and just start each
Cachex
locally? I don't plan to use this as a distributed cache just yet and if possible I'd like to avoid wiring up anything extra for the bulk of my tests that don't use a cluster as part of the test harness.Alternative Solution - if you have a pro-tip for running
LocalCluster.start
only for specific tests I could run w/ that for now. I originally got this working as-is and never had the need to go back and tune my ConnCase and DataCase behaviors to "not start LocalCluster"The full commit to see this failing test in action can be found using the branch below. I appreciate any help you can provide to get me moving in the right direction :)
https://github.com/toranb/elixir-budget/commit/ebddb9a6b48eaaba072b3a1070bd6ed1471c833d