Skip to content

Conversation

BobdenOs
Copy link
Contributor

Concept

This PR is an alternative to #952.

Instead of having test blindly rely on guaranteed isolation an explicit approach of guaranteeing no side effects is taken to allow all tests to run together in the same deployment. For most application tests this approach is straight forward to be achieved as the best practice is to leverage cds.UUID as primary key of all entities. Providing a proven solution to prevent side effects between multiple different tests. For cds-dbs the test scenarios have to include non best practice models. Additionally it requires to test CREATE and DROP of entities. Which directly clashes with the interlaced testing approach once a table is dropped this has side effects on other tests. Therefor the CREATE.test.js file was skipped for this PR for demonstrative purposes.

Limitation

Current limitation is that SQLite3 while running in WAL mode will instantly reject a transaction when creating lock conflicts. Which prevent two tests from modifying a single entity at all. As this creates flaky tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant