Clear test datasets before integration test
ekraffmiller opened this issue · comments
Ellen Kraffmiller commented
When the integration tests cause a build up of datasets in Dataverse, then calling destroyAll() before the "gets the total dataset count" test in DatasetJSDataverseRepository.spec.ts causes an optimistic lock exception in Dataverse.
To avoid having a large number of datasets to delete all at once, we can add destroyAll() to the beforeEach method of integration tests.
Here is an example of the test failure:
https://github.com/IQSS/dataverse-frontend/actions/runs/7653145563/job/20968488247