@@ -174,7 +174,7 @@ class TestableSSHRemoteAgentHostMainService extends SSHRemoteAgentHostMainServic
174174 hangRelayCreationOnCall : number | undefined ;
175175
176176 /** Public override so tests can shorten the relay creation timeout. */
177- override relayCreationTimeoutMs : number = 30_000 ;
177+ protected override relayCreationTimeoutMs : number = 30_000 ;
178178
179179 /** Stored onMessage callbacks from relays, most recent last. */
180180 private readonly _relayMessageCallbacks : Array < ( data : string ) => void > = [ ] ;
@@ -279,6 +279,11 @@ class TestableSSHRemoteAgentHostMainService extends SSHRemoteAgentHostMainServic
279279 this . _relayCloseCallbacks [ this . _relayCloseCallbacks . length - 1 ] ( ) ;
280280 }
281281 }
282+
283+ /** Sets the relay creation timeout; exposed for tests only. */
284+ setRelayCreationTimeoutForTest ( ms : number ) : void {
285+ this . relayCreationTimeoutMs = ms ;
286+ }
282287}
283288
284289suite ( 'SSHRemoteAgentHostMainService - connect flow' , ( ) => {
@@ -1017,7 +1022,7 @@ suite('SSHRemoteAgentHostMainService - connect flow', () => {
10171022 assert . strictEqual ( originalClient . ended , false ) ;
10181023
10191024 // Use a short timeout so the test completes quickly.
1020- service . relayCreationTimeoutMs = 50 ;
1025+ service . setRelayCreationTimeoutForTest ( 50 ) ;
10211026 // Make the *reconnect* call's relay creation hang (the second relay).
10221027 service . hangRelayCreationOnCall = 2 ;
10231028
0 commit comments