mirror of
https://github.com/meilisearch/MeiliSearch
synced 2024-12-23 13:10:06 +01:00
fix tests
This commit is contained in:
parent
3bdf01bc1c
commit
9859e65d2f
@ -1815,12 +1815,12 @@ mod tests {
|
|||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_task_is_processing() {
|
fn test_task_is_processing() {
|
||||||
let (index_scheduler, mut handle) = IndexScheduler::test(true, vec![]);
|
let (index_scheduler, _handle) = IndexScheduler::test(true, vec![]);
|
||||||
|
|
||||||
index_scheduler.register(index_creation_task("index_a", "id")).unwrap();
|
index_scheduler.register(index_creation_task("index_a", "id")).unwrap();
|
||||||
snapshot!(snapshot_index_scheduler(&index_scheduler), name: "registered_a_task");
|
snapshot!(snapshot_index_scheduler(&index_scheduler), name: "registered_a_task");
|
||||||
|
|
||||||
assert_eq!(index_scheduler.is_task_processing().unwrap(), true);
|
assert!(index_scheduler.is_task_processing().unwrap());
|
||||||
}
|
}
|
||||||
|
|
||||||
/// We send a lot of tasks but notify the tasks scheduler only once as
|
/// We send a lot of tasks but notify the tasks scheduler only once as
|
||||||
|
@ -48,8 +48,7 @@ pub async fn get_metrics(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
crate::metrics::MEILISEARCH_LAST_UPDATE
|
crate::metrics::MEILISEARCH_LAST_UPDATE.set(response.last_update.unwrap().unix_timestamp());
|
||||||
.set(response.last_update.unwrap().unix_timestamp());
|
|
||||||
crate::metrics::MEILISEARCH_IS_INDEXING
|
crate::metrics::MEILISEARCH_IS_INDEXING
|
||||||
.set(index_scheduler.is_task_processing().unwrap() as i64);
|
.set(index_scheduler.is_task_processing().unwrap() as i64);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user