@@ -43,7 +43,6 @@ use pretty_assertions::assert_eq;
4343
4444use crate :: init_meta_ut;
4545use crate :: tests:: assert_metasrv_connection;
46- use crate :: tests:: service:: new_metasrv_test_context;
4746use crate :: tests:: service:: MetaSrvTestContext ;
4847
4948#[ tokio:: test( flavor = "multi_thread" , worker_threads = 5 ) ]
@@ -54,7 +53,7 @@ async fn test_meta_node_boot() -> anyhow::Result<()> {
5453 let ( _log_guards, ut_span) = init_meta_ut ! ( ) ;
5554 let _ent = ut_span. enter ( ) ;
5655
57- let tc = new_metasrv_test_context ( 0 ) ;
56+ let tc = MetaSrvTestContext :: new ( 0 ) ;
5857 let addr = tc. config . raft_config . raft_api_addr ( ) ;
5958
6059 let mn = MetaNode :: boot ( & tc. config . raft_config ) . await ?;
@@ -279,7 +278,7 @@ async fn test_meta_node_snapshot_replication() -> anyhow::Result<()> {
279278 // Create a snapshot every 10 logs
280279 let snap_logs = 10 ;
281280
282- let mut tc = new_metasrv_test_context ( 0 ) ;
281+ let mut tc = MetaSrvTestContext :: new ( 0 ) ;
283282 tc. config . raft_config . snapshot_logs_since_last = snap_logs;
284283 tc. config . raft_config . install_snapshot_timeout = 10_1000 ; // milli seconds. In a CI multi-threads test delays async task badly.
285284 let addr = tc. config . raft_config . raft_api_addr ( ) ;
@@ -408,7 +407,7 @@ async fn test_meta_node_join() -> anyhow::Result<()> {
408407 tracing:: info!( "--- bring up non-voter 2" ) ;
409408
410409 let node_id = 2 ;
411- let tc2 = new_metasrv_test_context ( node_id) ;
410+ let tc2 = MetaSrvTestContext :: new ( node_id) ;
412411 let mn2 = MetaNode :: open_create_boot ( & tc2. config . raft_config , None , Some ( ( ) ) , None ) . await ?;
413412
414413 tracing:: info!( "--- join non-voter 2 to cluster by leader" ) ;
@@ -434,7 +433,7 @@ async fn test_meta_node_join() -> anyhow::Result<()> {
434433 tracing:: info!( "--- bring up non-voter 3" ) ;
435434
436435 let node_id = 3 ;
437- let tc3 = new_metasrv_test_context ( node_id) ;
436+ let tc3 = MetaSrvTestContext :: new ( node_id) ;
438437 let mn3 = MetaNode :: open_create_boot ( & tc3. config . raft_config , None , Some ( ( ) ) , None ) . await ?;
439438
440439 tracing:: info!( "--- join node-3 by sending rpc `join` to a non-leader" ) ;
@@ -505,7 +504,7 @@ async fn test_meta_node_join_rejoin() -> anyhow::Result<()> {
505504 tracing:: info!( "--- bring up non-voter 1" ) ;
506505
507506 let node_id = 1 ;
508- let tc1 = new_metasrv_test_context ( node_id) ;
507+ let tc1 = MetaSrvTestContext :: new ( node_id) ;
509508 let mn1 = MetaNode :: open_create_boot ( & tc1. config . raft_config , None , Some ( ( ) ) , None ) . await ?;
510509
511510 tracing:: info!( "--- join non-voter 1 to cluster" ) ;
@@ -530,7 +529,7 @@ async fn test_meta_node_join_rejoin() -> anyhow::Result<()> {
530529 tracing:: info!( "--- bring up non-voter 3" ) ;
531530
532531 let node_id = 2 ;
533- let tc2 = new_metasrv_test_context ( node_id) ;
532+ let tc2 = MetaSrvTestContext :: new ( node_id) ;
534533 let mn2 = MetaNode :: open_create_boot ( & tc2. config . raft_config , None , Some ( ( ) ) , None ) . await ?;
535534
536535 tracing:: info!( "--- join node-2 by sending rpc `join` to a non-leader" ) ;
@@ -779,7 +778,7 @@ async fn start_meta_node_leader() -> anyhow::Result<(NodeId, MetaSrvTestContext)
779778 // asserts states are consistent
780779
781780 let nid = 0 ;
782- let mut tc = new_metasrv_test_context ( nid) ;
781+ let mut tc = MetaSrvTestContext :: new ( nid) ;
783782 let addr = tc. config . raft_config . raft_api_addr ( ) ;
784783
785784 // boot up a single-node cluster
@@ -805,7 +804,7 @@ async fn start_meta_node_non_voter(
805804 leader : Arc < MetaNode > ,
806805 id : NodeId ,
807806) -> anyhow:: Result < ( NodeId , MetaSrvTestContext ) > {
808- let mut tc = new_metasrv_test_context ( id) ;
807+ let mut tc = MetaSrvTestContext :: new ( id) ;
809808 let addr = tc. config . raft_config . raft_api_addr ( ) ;
810809
811810 let raft_config = tc. config . raft_config . clone ( ) ;
0 commit comments