mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-14 06:03:45 +01:00
[BackFillDeletedFilesTests] fix flaky assertion -- sort db entries (#3674)
The projects are processed in parallel, so the entries are potentially not sorted. GitOrigin-RevId: 6523a4e3f738e1ce8b84ae0f7bd9bacb2abf39c4
This commit is contained in:
@@ -86,7 +86,9 @@ describe('BackFillDeletedFiles', function() {
|
||||
|
||||
function checkAreFilesBackFilled() {
|
||||
it('should back fill file and set projectId', async function() {
|
||||
const docs = await db.deletedFiles.find({}).toArray()
|
||||
const docs = await db.deletedFiles
|
||||
.find({}, { sort: { _id: 1 } })
|
||||
.toArray()
|
||||
expect(docs).to.deep.equal([
|
||||
{ _id: fileId1, projectId: projectId1, ...otherFileDetails },
|
||||
{ _id: fileId2, projectId: projectId1, ...otherFileDetails },
|
||||
|
||||
Reference in New Issue
Block a user