@@ -569,7 +569,7 @@ impl EventSubscriber<ShardPositionsUpdate> for ControlPlaneEventSubscriber {
569569mod tests {
570570 use mockall:: Sequence ;
571571 use quickwit_actors:: { AskError , Observe , SupervisorMetrics } ;
572- use quickwit_config:: { IndexConfig , SourceParams , INGEST_SOURCE_ID } ;
572+ use quickwit_config:: { IndexConfig , SourceParams , INGEST_V2_SOURCE_ID } ;
573573 use quickwit_indexing:: IndexingService ;
574574 use quickwit_metastore:: {
575575 CreateIndexRequestExt , IndexMetadata , ListIndexesMetadataResponseExt ,
@@ -893,14 +893,14 @@ mod tests {
893893
894894 let subrequest = & request. subrequests [ 0 ] ;
895895 assert_eq ! ( subrequest. index_uid, "test-index:0" ) ;
896- assert_eq ! ( subrequest. source_id, INGEST_SOURCE_ID ) ;
896+ assert_eq ! ( subrequest. source_id, INGEST_V2_SOURCE_ID ) ;
897897
898898 let subresponses = vec ! [ ListShardsSubresponse {
899899 index_uid: "test-index:0" . to_string( ) ,
900- source_id: INGEST_SOURCE_ID . to_string( ) ,
900+ source_id: INGEST_V2_SOURCE_ID . to_string( ) ,
901901 shards: vec![ Shard {
902902 index_uid: "test-index:0" . to_string( ) ,
903- source_id: INGEST_SOURCE_ID . to_string( ) ,
903+ source_id: INGEST_V2_SOURCE_ID . to_string( ) ,
904904 shard_id: 1 ,
905905 shard_state: ShardState :: Open as i32 ,
906906 ..Default :: default ( )
@@ -925,7 +925,7 @@ mod tests {
925925 subrequests : vec ! [ GetOrCreateOpenShardsSubrequest {
926926 subrequest_id: 0 ,
927927 index_id: "test-index" . to_string( ) ,
928- source_id: INGEST_SOURCE_ID . to_string( ) ,
928+ source_id: INGEST_V2_SOURCE_ID . to_string( ) ,
929929 } ] ,
930930 closed_shards : Vec :: new ( ) ,
931931 unavailable_leaders : Vec :: new ( ) ,
@@ -939,7 +939,7 @@ mod tests {
939939
940940 let subresponse = & get_open_shards_response. successes [ 0 ] ;
941941 assert_eq ! ( subresponse. index_uid, "test-index:0" ) ;
942- assert_eq ! ( subresponse. source_id, INGEST_SOURCE_ID ) ;
942+ assert_eq ! ( subresponse. source_id, INGEST_V2_SOURCE_ID ) ;
943943 assert_eq ! ( subresponse. open_shards. len( ) , 1 ) ;
944944 assert_eq ! ( subresponse. open_shards[ 0 ] . shard_id, 1 ) ;
945945
@@ -1111,15 +1111,15 @@ mod tests {
11111111 assert_eq ! ( delete_shards_request. subrequests. len( ) , 1 ) ;
11121112 let subrequest = & delete_shards_request. subrequests [ 0 ] ;
11131113 assert_eq ! ( subrequest. index_uid, index_uid_clone) ;
1114- assert_eq ! ( subrequest. source_id, INGEST_SOURCE_ID ) ;
1114+ assert_eq ! ( subrequest. source_id, INGEST_V2_SOURCE_ID ) ;
11151115 assert_eq ! ( & subrequest. shard_ids[ ..] , & [ 17 ] ) ;
11161116 Ok ( DeleteShardsResponse { } )
11171117 } ,
11181118 ) ;
11191119
11201120 let mut shard = Shard {
11211121 index_uid : index_0. index_uid . to_string ( ) ,
1122- source_id : INGEST_SOURCE_ID . to_string ( ) ,
1122+ source_id : INGEST_V2_SOURCE_ID . to_string ( ) ,
11231123 shard_id : 17 ,
11241124 leader_id : "test_node" . to_string ( ) ,
11251125 ..Default :: default ( )
@@ -1132,7 +1132,7 @@ mod tests {
11321132 let list_shards_resp = ListShardsResponse {
11331133 subresponses : vec ! [ ListShardsSubresponse {
11341134 index_uid: index_uid_clone. to_string( ) ,
1135- source_id: INGEST_SOURCE_ID . to_string( ) ,
1135+ source_id: INGEST_V2_SOURCE_ID . to_string( ) ,
11361136 shards: vec![ shard] ,
11371137 next_shard_id: 18 ,
11381138 } ] ,
@@ -1152,7 +1152,7 @@ mod tests {
11521152 ) ;
11531153 let source_uid = SourceUid {
11541154 index_uid : index_0. index_uid . clone ( ) ,
1155- source_id : INGEST_SOURCE_ID . to_string ( ) ,
1155+ source_id : INGEST_V2_SOURCE_ID . to_string ( ) ,
11561156 } ;
11571157
11581158 // This update should not triggeer anything in the control plane.
@@ -1246,7 +1246,7 @@ mod tests {
12461246 assert_eq ! ( delete_shards_request. subrequests. len( ) , 1 ) ;
12471247 let subrequest = & delete_shards_request. subrequests [ 0 ] ;
12481248 assert_eq ! ( subrequest. index_uid, index_uid_clone) ;
1249- assert_eq ! ( subrequest. source_id, INGEST_SOURCE_ID ) ;
1249+ assert_eq ! ( subrequest. source_id, INGEST_V2_SOURCE_ID ) ;
12501250 assert_eq ! ( & subrequest. shard_ids[ ..] , & [ 17 ] ) ;
12511251 Ok ( DeleteShardsResponse { } )
12521252 } ,
@@ -1258,7 +1258,7 @@ mod tests {
12581258 let list_shards_resp = ListShardsResponse {
12591259 subresponses : vec ! [ ListShardsSubresponse {
12601260 index_uid: index_uid_clone. to_string( ) ,
1261- source_id: INGEST_SOURCE_ID . to_string( ) ,
1261+ source_id: INGEST_V2_SOURCE_ID . to_string( ) ,
12621262 shards: vec![ ] ,
12631263 next_shard_id: 18 ,
12641264 } ] ,
@@ -1278,7 +1278,7 @@ mod tests {
12781278 ) ;
12791279 let source_uid = SourceUid {
12801280 index_uid : index_0. index_uid . clone ( ) ,
1281- source_id : INGEST_SOURCE_ID . to_string ( ) ,
1281+ source_id : INGEST_V2_SOURCE_ID . to_string ( ) ,
12821282 } ;
12831283
12841284 // This update should not triggeer anything in the control plane.
@@ -1332,7 +1332,7 @@ mod tests {
13321332 let list_shards_resp = ListShardsResponse {
13331333 subresponses : vec ! [ ListShardsSubresponse {
13341334 index_uid: index_uid_clone. to_string( ) ,
1335- source_id: INGEST_SOURCE_ID . to_string( ) ,
1335+ source_id: INGEST_V2_SOURCE_ID . to_string( ) ,
13361336 shards: vec![ Shard {
13371337 index_uid: index_uid_clone. to_string( ) ,
13381338 source_id: source. source_id. to_string( ) ,
@@ -1428,7 +1428,7 @@ mod tests {
14281428 mock_metastore. expect_delete_source ( ) . return_once (
14291429 move |delete_source_request : DeleteSourceRequest | {
14301430 assert_eq ! ( delete_source_request. index_uid, index_uid_clone. to_string( ) ) ;
1431- assert_eq ! ( & delete_source_request. source_id, INGEST_SOURCE_ID ) ;
1431+ assert_eq ! ( & delete_source_request. source_id, INGEST_V2_SOURCE_ID ) ;
14321432 Ok ( EmptyResponse { } )
14331433 } ,
14341434 ) ;
@@ -1454,7 +1454,7 @@ mod tests {
14541454 let list_shards_resp = ListShardsResponse {
14551455 subresponses : vec ! [ ListShardsSubresponse {
14561456 index_uid: index_uid_clone. to_string( ) ,
1457- source_id: INGEST_SOURCE_ID . to_string( ) ,
1457+ source_id: INGEST_V2_SOURCE_ID . to_string( ) ,
14581458 shards: vec![ Shard {
14591459 index_uid: index_uid_clone. to_string( ) ,
14601460 source_id: source. source_id. to_string( ) ,
@@ -1485,7 +1485,7 @@ mod tests {
14851485 control_plane_mailbox
14861486 . ask ( DeleteSourceRequest {
14871487 index_uid : index_0. index_uid . to_string ( ) ,
1488- source_id : INGEST_SOURCE_ID . to_string ( ) ,
1488+ source_id : INGEST_V2_SOURCE_ID . to_string ( ) ,
14891489 } )
14901490 . await
14911491 . unwrap ( )
0 commit comments