You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I am using the Commanded.EventStore.Adapters.InMemory store during tests and resetting it in on_exit as this wiki page suggests, does this preclude me from using the async: true on the ExUnit test case? I assume the InMemory store is global state, right?
Also, in that wiki page, I feel like it is missing the actual call to reset/2. I don't seem to have the power to suggest edits to the wiki so if you see this and agree, maybe consider updating it.
defmodule InMemoryEventStoreCase do
use ExUnit.CaseTemplate
alias Commanded.EventStore.Adapters.InMemory
setup do
{:ok, _apps} = Application. ensure_all_started(:my_app)
+ Commanded.EventStore.Adapters.InMemory.reset!(MyApp.App)
on_exit(fn ->
:ok = Application.stop(:my_app)
end)
end
end
Thanks for any help or insights. Enjoying the library so far with my tinker project.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
If I am using the
Commanded.EventStore.Adapters.InMemory
store during tests and resetting it inon_exit
as this wiki page suggests, does this preclude me from using theasync: true
on the ExUnit test case? I assume theInMemory
store is global state, right?Also, in that wiki page, I feel like it is missing the actual call to
reset/2
. I don't seem to have the power to suggest edits to the wiki so if you see this and agree, maybe consider updating it.defmodule InMemoryEventStoreCase do use ExUnit.CaseTemplate alias Commanded.EventStore.Adapters.InMemory setup do {:ok, _apps} = Application. ensure_all_started(:my_app) + Commanded.EventStore.Adapters.InMemory.reset!(MyApp.App) on_exit(fn -> :ok = Application.stop(:my_app) end) end end
Thanks for any help or insights. Enjoying the library so far with my tinker project.
Beta Was this translation helpful? Give feedback.
All reactions