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
I think the main point that needs to be answered here is whether we want:
100% reproducability of tests (because they always start with an empty DB)
resilience and independence of the tests at the cost of reproducability (i.e. assuming that the DB is not empty and writing tests such that they still run green)
Advantage:
They might catch some more real-life bugs, because at runtime the DB also is not empty
you can run them in parallel
Disadvantage:
Tests in CI might fail, but it's not reproducable locally, since it might depend on the state of the DB.
Tests are maybe a bit harder to write, because they need to be such that they ignore already existing entries in the DB
I would also favor 2. I'm just saying it needs to be a conscious decision.
Can't we just have a separate db for each test file, or for each process/thread? I don't understand enough (yet) about our setup, but that way it might be possible to avoid the (low) risk of issues (I've run tests in parallel and didn't see any issues, even without any extra db setup in the past).
I've never done test parallelization with gradle and testcontainers. I don't know how it would behave. And I can't judge which would be the easier approach.
Would be nice if we could run backend tests in parallel, right now some tests seem to require an empty database which is problematic.
Related to #2710
The text was updated successfully, but these errors were encountered: