Skip to content

Commit 9e55019

Browse files
committed
Apply Fix for testDeleteAllDocuments
Other solutions include: - fetching all documents and asserting total count - deleting all documents before adding again (expect 8) - create a new index just for this one test
1 parent f10885c commit 9e55019

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Tests/MeiliSearchIntegrationTests/DocumentsTests.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,9 @@ class DocumentsTests: XCTestCase {
366366
XCTAssertEqual(Task.Status.succeeded, task.status)
367367
XCTAssertEqual("documentDeletion", task.type.description)
368368
if case .documentDeletion(let details) = task.details {
369-
XCTAssertEqual(8, details.deletedDocuments)
369+
// It's possible for this to number to be greater than 8 (the number of documents we have inserted) due
370+
// to other integration tests populating the shared index.
371+
XCTAssertGreaterThanOrEqual(details.deletedDocuments ?? -1, 8)
370372
} else {
371373
XCTFail("documentDeletion details should be set by task")
372374
}

0 commit comments

Comments
 (0)