diff --git a/tests/e2e-integration/integration/files/FileJSDataverseRepository.spec.ts b/tests/e2e-integration/integration/files/FileJSDataverseRepository.spec.ts index a305136d2..09c7de97c 100644 --- a/tests/e2e-integration/integration/files/FileJSDataverseRepository.spec.ts +++ b/tests/e2e-integration/integration/files/FileJSDataverseRepository.spec.ts @@ -672,7 +672,7 @@ describe('File JSDataverse Repository', () => { ) if (!dataset) throw new Error('Dataset not found') - await TestsUtils.wait(2500) // wait for the files to be ingested + await TestsUtils.waitForNoLocks(dataset.persistentId) // wait for the files to be ingested const expectedTotalDownloadSize = await fileRepository .getAllByDatasetPersistentId(dataset.persistentId, dataset.version) @@ -710,7 +710,7 @@ describe('File JSDataverse Repository', () => { ) if (!dataset) throw new Error('Dataset not found') - await TestsUtils.wait(2500) // wait for the files to be ingested + await TestsUtils.waitForNoLocks(dataset.persistentId) // wait for the files to be ingested const expectedTotalDownloadSize = await fileRepository .getAllByDatasetPersistentId(