File tree Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -104,8 +104,21 @@ async function runTest(t: Deno.TestContext, path: string): Promise<void> {
104
104
...envVars ,
105
105
} ,
106
106
cwd,
107
- } ) ;
107
+ stdout : "piped" ,
108
+ stderr : "piped" ,
109
+ } ) . spawn ( ) ;
110
+ const warner = setTimeout ( ( ) => {
111
+ console . error ( `Test is running slow: ${ testCase } ` ) ;
112
+ } , 2 * 60_000 ) ;
113
+ const killer = setTimeout ( ( ) => {
114
+ console . error (
115
+ `Test ran far too long, terminating with extreme prejudice: ${ testCase } ` ,
116
+ ) ;
117
+ command . kill ( ) ;
118
+ } , 10 * 60_000 ) ;
108
119
const { code, stdout, stderr } = await command . output ( ) ;
120
+ clearTimeout ( warner ) ;
121
+ clearTimeout ( killer ) ;
109
122
110
123
if ( code !== 0 ) {
111
124
// If the test case failed, show the stdout, stderr, and instruction
You can’t perform that action at this time.
0 commit comments