mirror of
https://github.com/meilisearch/meilisearch.git
synced 2025-07-26 00:01:00 +00:00
Fix tests after adding DeletionStrategy
This commit is contained in:
@ -463,11 +463,14 @@ mod tests {
|
||||
use crate::db_snap;
|
||||
use crate::documents::documents_batch_reader_from_objects;
|
||||
use crate::index::tests::TempIndex;
|
||||
use crate::update::DeletionStrategy;
|
||||
|
||||
#[test]
|
||||
fn replace_all_identical_soft_deletion_then_hard_deletion() {
|
||||
let mut index = TempIndex::new_with_map_size(4096 * 1000 * 100);
|
||||
|
||||
index.index_documents_config.deletion_strategy = DeletionStrategy::AlwaysSoft;
|
||||
|
||||
index
|
||||
.update_settings(|settings| {
|
||||
settings.set_primary_key("id".to_owned());
|
||||
@ -521,7 +524,7 @@ mod tests {
|
||||
db_snap!(index, soft_deleted_documents_ids, "replaced_1_soft", @"6c975deb900f286d2f6456d2d5c3a123");
|
||||
|
||||
// Then replace the last document while disabling soft_deletion
|
||||
index.index_documents_config.disable_soft_deletion = true;
|
||||
index.index_documents_config.deletion_strategy = DeletionStrategy::AlwaysHard;
|
||||
let mut documents = vec![];
|
||||
for i in 999..1000 {
|
||||
documents.push(
|
||||
|
Reference in New Issue
Block a user