diff --git a/Cargo.lock b/Cargo.lock index 0a05db081c..7101579b1a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2206,12 +2206,12 @@ dependencies = [ "iox_catalog", "iox_query", "iox_time", - "lazy_static", "metric", "mutable_batch", "mutable_batch_lp", "object_store", "observability_deps", + "once_cell", "parking_lot 0.12.1", "parquet_file", "paste", @@ -3919,8 +3919,8 @@ dependencies = [ "datafusion 0.1.0", "datafusion_util", "itertools", - "lazy_static", "observability_deps", + "once_cell", "regex", "regex-syntax", "schema", @@ -4242,13 +4242,13 @@ dependencies = [ "hyper", "iox_catalog", "iox_time", - "lazy_static", "metric", "mutable_batch", "mutable_batch_lp", "mutable_batch_pb", "object_store", "observability_deps", + "once_cell", "parking_lot 0.12.1", "paste", "predicate", @@ -5243,7 +5243,6 @@ dependencies = [ "http", "hyper", "influxdb_iox_client", - "lazy_static", "nix 0.24.1", "observability_deps", "once_cell", diff --git a/ingester/Cargo.toml b/ingester/Cargo.toml index 9bee010215..8e25bcb91d 100644 --- a/ingester/Cargo.toml +++ b/ingester/Cargo.toml @@ -49,7 +49,7 @@ trace = { path = "../trace" } [dev-dependencies] assert_matches = "1.5.0" bitflags = {version = "1.3.2"} -lazy_static = "1.4.0" +once_cell = "1" paste = "1.0.7" test_helpers = { path = "../test_helpers", features = ["future_timeout"] } tokio-stream = {version = "0.1.9", default_features = false } diff --git a/ingester/src/stream_handler/handler.rs b/ingester/src/stream_handler/handler.rs index 83c09f45c6..2cc9779d5a 100644 --- a/ingester/src/stream_handler/handler.rs +++ b/ingester/src/stream_handler/handler.rs @@ -443,16 +443,15 @@ mod tests { use iox_time::{SystemProvider, Time}; use metric::Metric; use mutable_batch_lp::lines_to_batches; + use once_cell::sync::Lazy; use std::sync::Arc; use test_helpers::timeout::FutureTimeout; use tokio::sync::{mpsc, oneshot}; use tokio_stream::wrappers::ReceiverStream; use write_buffer::core::WriteBufferError; - lazy_static::lazy_static! { - static ref TEST_TIME: Time = SystemProvider::default().now(); - static ref TEST_KAFKA_PARTITION: KafkaPartition = KafkaPartition::new(42); - } + static TEST_TIME: Lazy