This commit is contained in:
Clément Renault 2024-11-19 16:02:57 +01:00
parent 01b27e40ad
commit fe04e51a49
No known key found for this signature in database
GPG Key ID: F250A4C4E3AE5F5F

View File

@ -3110,12 +3110,16 @@ mod tests {
]),
)
.unwrap();
wtxn.commit().unwrap();
let mut wtxn = index.write_txn().unwrap();
let deleted_external_ids = ["1_7", "1_52"];
let deleted_internal_ids = delete_documents(&mut wtxn, &index, &deleted_external_ids);
wtxn.commit().unwrap();
let rtxn = index.read_txn().unwrap();
// list all documents
let results = index.all_documents(&wtxn).unwrap();
let results = index.all_documents(&rtxn).unwrap();
for result in results {
let (id, _) = result.unwrap();
assert!(
@ -3126,7 +3130,7 @@ mod tests {
}
// list internal document ids
let results = index.documents_ids(&wtxn).unwrap();
let results = index.documents_ids(&rtxn).unwrap();
for id in results {
assert!(
!deleted_internal_ids.contains(&id),
@ -3134,9 +3138,6 @@ mod tests {
id
);
}
wtxn.commit().unwrap();
let rtxn = index.read_txn().unwrap();
// get internal docids from deleted external document ids
let results = index.external_documents_ids();