@@ -48,7 +48,7 @@ struct EnvironmentToml {
4848 initialize_timeout_sec : Option < Duration > ,
4949}
5050
51- #[ derive( Clone , Debug , PartialEq , Eq ) ]
51+ #[ derive( Clone , Debug ) ]
5252struct TomlEnvironmentProvider {
5353 default : EnvironmentDefault ,
5454 include_local : bool ,
@@ -577,18 +577,26 @@ mod tests {
577577 )
578578 . expect ( "provider" ) ;
579579
580+ let ExecServerTransportParams :: StdioCommand {
581+ command,
582+ initialize_timeout,
583+ } = & provider. environments [ 0 ] . 1
584+ else {
585+ panic ! ( "expected stdio transport" ) ;
586+ } ;
580587 assert_eq ! (
581- provider. environments[ 0 ] . 1 ,
582- ExecServerTransportParams :: StdioCommand {
583- command: StdioExecServerCommand {
584- program: "ssh" . to_string( ) ,
585- args: Vec :: new( ) ,
586- env: HashMap :: new( ) ,
587- cwd: Some ( config_dir. path( ) . join( "workspace" ) ) ,
588- } ,
589- initialize_timeout: DEFAULT_REMOTE_EXEC_SERVER_INITIALIZE_TIMEOUT ,
588+ command,
589+ & StdioExecServerCommand {
590+ program: "ssh" . to_string( ) ,
591+ args: Vec :: new( ) ,
592+ env: HashMap :: new( ) ,
593+ cwd: Some ( config_dir. path( ) . join( "workspace" ) ) ,
590594 }
591595 ) ;
596+ assert_eq ! (
597+ * initialize_timeout,
598+ DEFAULT_REMOTE_EXEC_SERVER_INITIALIZE_TIMEOUT
599+ ) ;
592600 }
593601
594602 #[ test]
@@ -614,26 +622,35 @@ mod tests {
614622 } )
615623 . expect ( "provider" ) ;
616624
625+ let ExecServerTransportParams :: WebSocketUrl {
626+ websocket_url,
627+ connect_timeout,
628+ initialize_timeout,
629+ } = & provider. environments [ 0 ] . 1
630+ else {
631+ panic ! ( "expected websocket transport" ) ;
632+ } ;
633+ assert_eq ! ( websocket_url, "ws://127.0.0.1:8765" ) ;
634+ assert_eq ! ( * connect_timeout, Duration :: from_secs( 12 ) ) ;
635+ assert_eq ! ( * initialize_timeout, Duration :: from_secs( 34 ) ) ;
636+
637+ let ExecServerTransportParams :: StdioCommand {
638+ command,
639+ initialize_timeout,
640+ } = & provider. environments [ 1 ] . 1
641+ else {
642+ panic ! ( "expected stdio transport" ) ;
643+ } ;
617644 assert_eq ! (
618- provider. environments[ 0 ] . 1 ,
619- ExecServerTransportParams :: WebSocketUrl {
620- websocket_url: "ws://127.0.0.1:8765" . to_string( ) ,
621- connect_timeout: Duration :: from_secs( 12 ) ,
622- initialize_timeout: Duration :: from_secs( 34 ) ,
623- }
624- ) ;
625- assert_eq ! (
626- provider. environments[ 1 ] . 1 ,
627- ExecServerTransportParams :: StdioCommand {
628- command: StdioExecServerCommand {
629- program: "ssh" . to_string( ) ,
630- args: Vec :: new( ) ,
631- env: HashMap :: new( ) ,
632- cwd: None ,
633- } ,
634- initialize_timeout: Duration :: from_secs( 56 ) ,
645+ command,
646+ & StdioExecServerCommand {
647+ program: "ssh" . to_string( ) ,
648+ args: Vec :: new( ) ,
649+ env: HashMap :: new( ) ,
650+ cwd: None ,
635651 }
636652 ) ;
653+ assert_eq ! ( * initialize_timeout, Duration :: from_secs( 56 ) ) ;
637654 }
638655
639656 #[ test]
0 commit comments