Ash FrameworkAF
Ash Framework8mo ago
19 replies
quartz

ExUnit async: true {:error, :table_not_found} with Ash.DataLayer.Ets

I've recently done a refactor on a test suite to allow all cases to run asynchronously. Unfortunately at some point I've started getting intermittent :table_not_found errors thrown on the actions of an Ets backed resource. It's almost guaranteed to happen when the whole suite (200+ tests) runs asynchronously. Is this expected? Meaning Ash.DataLayer.Ets isn't ready/meant to be used with asynchronous tests or am I missing some proper setup?

For reference, these Ets backed resources serve as an in-memory cache to avoid hitting the DB constantly. The main use-case is to cache actor/account permissions to be used by policies.
Was this page helpful?