Testing with Ash fail
Hi guys
I'm using Ash Framework in my Elixir project, and I have several tests that depend on a relatively complex seeding process.
My seeding logic involves ( using setup to run before each step ) :
Calling a custom fixture module that creates a lot of entities.
Using Ash.bulk_create and other Ash APIs to populate the database.
Here’s the issue I’m facing:
When I run each test individually, all of them pass without any problem.
However, when I run all tests together — even with async: false — only one test succeeds and the rest fail ,
For context:
All tests use the same Repo and Ash resources.
I run them with async: false (so concurrency shouldn’t be the issue). ( runningthem with async: true don't fix it either )
Each test calls the seeding logic in its setup.
The seeds include multiple Ash.bulk_create operations.
What I’d like to understand is:
Is there an Ash-specific way (besides Ecto sandboxing) to ensure each test starts with a clean state when using bulk operations and fixtures?
and thanks a lot in advance :Prayge:
I'm using Ash Framework in my Elixir project, and I have several tests that depend on a relatively complex seeding process.
My seeding logic involves ( using setup to run before each step ) :
Calling a custom fixture module that creates a lot of entities.
Using Ash.bulk_create and other Ash APIs to populate the database.
Here’s the issue I’m facing:
When I run each test individually, all of them pass without any problem.
However, when I run all tests together — even with async: false — only one test succeeds and the rest fail ,
For context:
All tests use the same Repo and Ash resources.
I run them with async: false (so concurrency shouldn’t be the issue). ( runningthem with async: true don't fix it either )
Each test calls the seeding logic in its setup.
The seeds include multiple Ash.bulk_create operations.
What I’d like to understand is:
Is there an Ash-specific way (besides Ecto sandboxing) to ensure each test starts with a clean state when using bulk operations and fixtures?
and thanks a lot in advance :Prayge:
