mirror of
https://github.com/meilisearch/meilisearch.git
synced 2024-11-22 10:07:40 +08:00
Fail in case of user error in tests
This commit is contained in:
parent
3957917e0b
commit
52f2fc4c46
@ -1757,7 +1757,7 @@ pub(crate) mod tests {
|
|||||||
indexer.add_documents(&documents).unwrap();
|
indexer.add_documents(&documents).unwrap();
|
||||||
|
|
||||||
let indexer_alloc = Bump::new();
|
let indexer_alloc = Bump::new();
|
||||||
let (document_changes, _operation_stats, primary_key) = indexer.into_changes(
|
let (document_changes, operation_stats, primary_key) = indexer.into_changes(
|
||||||
&indexer_alloc,
|
&indexer_alloc,
|
||||||
&self.inner,
|
&self.inner,
|
||||||
&rtxn,
|
&rtxn,
|
||||||
@ -1765,6 +1765,10 @@ pub(crate) mod tests {
|
|||||||
&mut new_fields_ids_map,
|
&mut new_fields_ids_map,
|
||||||
)?;
|
)?;
|
||||||
|
|
||||||
|
if let Some(error) = operation_stats.into_iter().find_map(|stat| stat.error) {
|
||||||
|
return Err(error.into());
|
||||||
|
}
|
||||||
|
|
||||||
pool.install(|| {
|
pool.install(|| {
|
||||||
indexer::index(
|
indexer::index(
|
||||||
wtxn,
|
wtxn,
|
||||||
@ -1841,7 +1845,7 @@ pub(crate) mod tests {
|
|||||||
indexer.delete_documents(external_document_ids.as_slice());
|
indexer.delete_documents(external_document_ids.as_slice());
|
||||||
|
|
||||||
let indexer_alloc = Bump::new();
|
let indexer_alloc = Bump::new();
|
||||||
let (document_changes, _operation_stats, primary_key) = indexer.into_changes(
|
let (document_changes, operation_stats, primary_key) = indexer.into_changes(
|
||||||
&indexer_alloc,
|
&indexer_alloc,
|
||||||
&self.inner,
|
&self.inner,
|
||||||
&rtxn,
|
&rtxn,
|
||||||
@ -1849,6 +1853,10 @@ pub(crate) mod tests {
|
|||||||
&mut new_fields_ids_map,
|
&mut new_fields_ids_map,
|
||||||
)?;
|
)?;
|
||||||
|
|
||||||
|
if let Some(error) = operation_stats.into_iter().find_map(|stat| stat.error) {
|
||||||
|
return Err(error.into());
|
||||||
|
}
|
||||||
|
|
||||||
pool.install(|| {
|
pool.install(|| {
|
||||||
indexer::index(
|
indexer::index(
|
||||||
wtxn,
|
wtxn,
|
||||||
|
Loading…
Reference in New Issue
Block a user