@@ -33,8 +33,7 @@ class TestRemoteRuntime extends RemoteRuntime {
3333 constructor (
3434 private readonly childProcess : FakeChildProcess ,
3535 private readonly onExitCalls : Array < [ number , string ] > ,
36- private readonly onCloseCalls : number [ ] ,
37- private readonly onExitCodeCalls : number [ ]
36+ private readonly onCloseCalls : number [ ]
3837 ) {
3938 super ( ) ;
4039 }
@@ -66,10 +65,6 @@ class TestRemoteRuntime extends RemoteRuntime {
6665 return `cd ${ cwd } ` ;
6766 }
6867
69- protected override onExitCode ( exitCode : number ) : void {
70- this . onExitCodeCalls . push ( exitCode ) ;
71- }
72-
7368 resolvePath ( targetPath : string ) : Promise < string > {
7469 return Promise . resolve ( targetPath ) ;
7570 }
@@ -108,8 +103,7 @@ describe("RemoteRuntime synthetic exit handling", () => {
108103 const childProcess = new FakeChildProcess ( ) ;
109104 const onExitCalls : Array < [ number , string ] > = [ ] ;
110105 const onCloseCalls : number [ ] = [ ] ;
111- const onExitCodeCalls : number [ ] = [ ] ;
112- const runtime = new TestRemoteRuntime ( childProcess , onExitCalls , onCloseCalls , onExitCodeCalls ) ;
106+ const runtime = new TestRemoteRuntime ( childProcess , onExitCalls , onCloseCalls ) ;
113107 const controller = new AbortController ( ) ;
114108
115109 const stream = await runtime . exec ( "echo ok" , { cwd : "/tmp" , abortSignal : controller . signal } ) ;
@@ -119,15 +113,13 @@ describe("RemoteRuntime synthetic exit handling", () => {
119113 expect ( await stream . exitCode ) . toBe ( EXIT_CODE_ABORTED ) ;
120114 expect ( onExitCalls ) . toEqual ( [ ] ) ;
121115 expect ( onCloseCalls ) . toEqual ( [ 1 ] ) ;
122- expect ( onExitCodeCalls ) . toEqual ( [ EXIT_CODE_ABORTED ] ) ;
123116 } ) ;
124117
125118 test ( "does not forward timed-out exits to transport onExit hooks" , async ( ) => {
126119 const childProcess = new FakeChildProcess ( ) ;
127120 const onExitCalls : Array < [ number , string ] > = [ ] ;
128121 const onCloseCalls : number [ ] = [ ] ;
129- const onExitCodeCalls : number [ ] = [ ] ;
130- const runtime = new TestRemoteRuntime ( childProcess , onExitCalls , onCloseCalls , onExitCodeCalls ) ;
122+ const runtime = new TestRemoteRuntime ( childProcess , onExitCalls , onCloseCalls ) ;
131123
132124 const stream = await runtime . exec ( "echo ok" , { cwd : "/tmp" , timeout : 0.01 } ) ;
133125 await new Promise ( ( resolve ) => setTimeout ( resolve , 20 ) ) ;
@@ -136,6 +128,5 @@ describe("RemoteRuntime synthetic exit handling", () => {
136128 expect ( await stream . exitCode ) . toBe ( EXIT_CODE_TIMEOUT ) ;
137129 expect ( onExitCalls ) . toEqual ( [ ] ) ;
138130 expect ( onCloseCalls ) . toEqual ( [ 1 ] ) ;
139- expect ( onExitCodeCalls ) . toEqual ( [ EXIT_CODE_TIMEOUT ] ) ;
140131 } ) ;
141132} ) ;
0 commit comments