@@ -142,25 +142,29 @@ describeIntegration("Runtime integration tests", () => {
142142
143143 expect ( result . stdout . trim ( ) ) . toContain ( workspace . path ) ;
144144 } ) ;
145- test . concurrent ( "handles timeout correctly" , async ( ) => {
146- const runtime = createRuntime ( ) ;
147- await using workspace = await TestWorkspace . create ( runtime , type ) ;
145+ test . concurrent (
146+ "handles timeout correctly" ,
147+ async ( ) => {
148+ const runtime = createRuntime ( ) ;
149+ await using workspace = await TestWorkspace . create ( runtime , type ) ;
148150
149- // Command that sleeps longer than timeout
150- const startTime = performance . now ( ) ;
151- const result = await execBuffered ( runtime , "sleep 10" , {
152- cwd : workspace . path ,
153- timeout : 1 , // 1 second timeout
154- } ) ;
155- const duration = performance . now ( ) - startTime ;
156-
157- // Exit code should be EXIT_CODE_TIMEOUT (-998)
158- expect ( result . exitCode ) . toBe ( - 998 ) ;
159- // Should complete in around 1 second, not 10 seconds
160- // Allow some margin for overhead (especially on SSH)
161- expect ( duration ) . toBeLessThan ( 3000 ) ; // 3 seconds max
162- expect ( duration ) . toBeGreaterThan ( 500 ) ; // At least 0.5 seconds
163- } ) ;
151+ // Command that sleeps longer than timeout
152+ const startTime = performance . now ( ) ;
153+ const result = await execBuffered ( runtime , "sleep 10" , {
154+ cwd : workspace . path ,
155+ timeout : 1 , // 1 second timeout
156+ } ) ;
157+ const duration = performance . now ( ) - startTime ;
158+
159+ // Exit code should be EXIT_CODE_TIMEOUT (-998)
160+ expect ( result . exitCode ) . toBe ( - 998 ) ;
161+ // Should complete in around 1 second, not 10 seconds
162+ // Allow some margin for overhead (especially on SSH)
163+ expect ( duration ) . toBeLessThan ( 3000 ) ; // 3 seconds max
164+ expect ( duration ) . toBeGreaterThan ( 500 ) ; // At least 0.5 seconds
165+ } ,
166+ 15000
167+ ) ; // 15 second timeout for test (includes workspace creation overhead)
164168 } ) ;
165169
166170 describe ( "readFile() - File reading" , ( ) => {
0 commit comments