@@ -17,7 +17,7 @@ use torrust_tracker_primitives::DurationSinceUnixEpoch;
1717use torrust_tracker_swarm_coordination_registry:: container:: SwarmCoordinationRegistryContainer ;
1818
1919pub struct TestEnv {
20- pub torrent_repository_container : Arc < SwarmCoordinationRegistryContainer > ,
20+ pub swarm_coordination_registry_container : Arc < SwarmCoordinationRegistryContainer > ,
2121 pub tracker_core_container : Arc < TrackerCoreContainer > ,
2222}
2323
@@ -33,17 +33,17 @@ impl TestEnv {
3333 pub fn new ( core_config : Core ) -> Self {
3434 let core_config = Arc :: new ( core_config) ;
3535
36- let torrent_repository_container = Arc :: new ( SwarmCoordinationRegistryContainer :: initialize (
36+ let swarm_coordination_registry_container = Arc :: new ( SwarmCoordinationRegistryContainer :: initialize (
3737 core_config. tracker_usage_statistics . into ( ) ,
3838 ) ) ;
3939
4040 let tracker_core_container = Arc :: new ( TrackerCoreContainer :: initialize_from (
4141 & core_config,
42- & torrent_repository_container ,
42+ & swarm_coordination_registry_container ,
4343 ) ) ;
4444
4545 Self {
46- torrent_repository_container ,
46+ swarm_coordination_registry_container ,
4747 tracker_core_container,
4848 }
4949 }
@@ -68,13 +68,13 @@ impl TestEnv {
6868 let mut jobs = vec ! [ ] ;
6969
7070 let job = torrust_tracker_swarm_coordination_registry:: statistics:: event:: listener:: run_event_listener (
71- self . torrent_repository_container . event_bus . receiver ( ) ,
72- & self . torrent_repository_container . stats_repository ,
71+ self . swarm_coordination_registry_container . event_bus . receiver ( ) ,
72+ & self . swarm_coordination_registry_container . stats_repository ,
7373 ) ;
7474 jobs. push ( job) ;
7575
7676 let job = bittorrent_tracker_core:: statistics:: event:: listener:: run_event_listener (
77- self . torrent_repository_container . event_bus . receiver ( ) ,
77+ self . swarm_coordination_registry_container . event_bus . receiver ( ) ,
7878 & self . tracker_core_container . stats_repository ,
7979 & self . tracker_core_container . db_downloads_metric_repository ,
8080 self . tracker_core_container
@@ -147,15 +147,19 @@ impl TestEnv {
147147 }
148148
149149 pub async fn get_swarm_metadata ( & self , info_hash : & InfoHash ) -> Option < SwarmMetadata > {
150- self . torrent_repository_container
150+ self . swarm_coordination_registry_container
151151 . swarms
152152 . get_swarm_metadata ( info_hash)
153153 . await
154154 . unwrap ( )
155155 }
156156
157157 pub async fn remove_swarm ( & self , info_hash : & InfoHash ) {
158- self . torrent_repository_container . swarms . remove ( info_hash) . await . unwrap ( ) ;
158+ self . swarm_coordination_registry_container
159+ . swarms
160+ . remove ( info_hash)
161+ . await
162+ . unwrap ( ) ;
159163 }
160164
161165 pub async fn get_counter_value ( & self , metric_name : & str ) -> u64 {
0 commit comments