mirror of
https://github.com/overleaf/overleaf.git
synced 2025-02-17 02:54:11 +00: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:
parent
2051caf28e
commit
58b8ac3775
1 changed files with 3 additions and 1 deletions
|
@ -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 },
|
||||
|
|
Loading…
Reference in a new issue