File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed
quickwit/quickwit-indexing/src/actors Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -1032,6 +1032,7 @@ mod tests {
10321032 } ;
10331033
10341034 use super :: * ;
1035+ use crate :: actors:: merge_pipeline:: SUPERVISE_LOOP_INTERVAL ;
10351036
10361037 async fn spawn_indexing_service_for_test (
10371038 data_dir_path : & Path ,
@@ -1605,7 +1606,7 @@ mod tests {
16051606 let observation = indexing_server_handle. process_pending_and_observe ( ) . await ;
16061607 assert_eq ! ( observation. num_running_pipelines, 0 ) ;
16071608 assert_eq ! ( observation. num_running_merge_pipelines, 0 ) ;
1608- universe. sleep ( * HEARTBEAT ) . await ;
1609+ universe. sleep ( SUPERVISE_LOOP_INTERVAL ) . await ;
16091610 // Check that the merge pipeline is also shut down as they are no more indexing pipeilne on
16101611 // the index.
16111612 assert ! ( universe. get_one:: <MergePipeline >( ) . is_none( ) ) ;
Original file line number Diff line number Diff line change @@ -69,6 +69,8 @@ static SPAWN_PIPELINE_SEMAPHORE: Semaphore = Semaphore::const_new(10);
6969#[ derive( Debug , Clone , Copy ) ]
7070pub struct FinishPendingMergesAndShutdownPipeline ;
7171
72+ pub const SUPERVISE_LOOP_INTERVAL : Duration = Duration :: from_secs ( 1 ) ;
73+
7274struct MergePipelineHandles {
7375 merge_planner : ActorHandle < MergePlanner > ,
7476 merge_split_downloader : ActorHandle < MergeSplitDownloader > ,
@@ -480,7 +482,7 @@ impl Handler<SuperviseLoop> for MergePipeline {
480482 ) -> Result < ( ) , ActorExitStatus > {
481483 self . perform_observe ( ) . await ;
482484 self . perform_health_check ( ctx) . await ?;
483- ctx. schedule_self_msg ( Duration :: from_secs ( 1 ) , supervise_loop_token) ;
485+ ctx. schedule_self_msg ( SUPERVISE_LOOP_INTERVAL , supervise_loop_token) ;
484486 Ok ( ( ) )
485487 }
486488}
You can’t perform that action at this time.
0 commit comments