Skip to content

Commit

Permalink
Fix IndexingStatistics-related tests
Browse files Browse the repository at this point in the history
  • Loading branch information
guilload committed Oct 27, 2023
1 parent 67e3ee9 commit 4cab5b6
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
4 changes: 3 additions & 1 deletion quickwit/quickwit-indexing/src/actors/indexer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1062,7 +1062,9 @@ mod tests {
.await
.unwrap();
universe.sleep(Duration::from_secs(3)).await;
let indexer_counters = indexer_handle.observe().await.state;
let mut indexer_counters = indexer_handle.observe().await.state;
indexer_counters.pipeline_metrics_opt = None;

assert_eq!(
indexer_counters,
IndexerCounters {
Expand Down
3 changes: 2 additions & 1 deletion quickwit/quickwit-indexing/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ use quickwit_cluster::Cluster;
use quickwit_common::pubsub::EventBroker;
use quickwit_config::NodeConfig;
use quickwit_ingest::{IngestApiService, IngesterPool};
use quickwit_proto::indexing::PipelineMetrics;
use quickwit_proto::metastore::MetastoreServiceClient;
use quickwit_storage::StorageResolver;
use tracing::info;
Expand Down Expand Up @@ -53,7 +54,7 @@ use self::merge_policy::MergePolicy;
pub use self::source::check_source_connectivity;

#[derive(utoipa::OpenApi)]
#[openapi(components(schemas(IndexingStatistics)))]
#[openapi(components(schemas(IndexingStatistics, PipelineMetrics)))]
/// Schema used for the OpenAPI generation which are apart of this crate.
pub struct IndexingApiSchemas;

Expand Down
2 changes: 1 addition & 1 deletion quickwit/quickwit-proto/src/indexing/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ impl TryFrom<&str> for IndexingTask {
}
}

#[derive(Clone, Copy, Debug, PartialEq, Eq, Serialize)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Serialize, utoipa::ToSchema)]
pub struct PipelineMetrics {
pub cpu_thousandth: u16,
pub throughput_mb_per_sec: u16,
Expand Down

0 comments on commit 4cab5b6

Please sign in to comment.