diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/node_compat/test.ts | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/tests/node_compat/test.ts b/tests/node_compat/test.ts index 2f690e943..db4ba4f52 100644 --- a/tests/node_compat/test.ts +++ b/tests/node_compat/test.ts @@ -104,8 +104,21 @@ async function runTest(t: Deno.TestContext, path: string): Promise<void> { ...envVars, }, cwd, - }); + stdout: "piped", + stderr: "piped", + }).spawn(); + const warner = setTimeout(() => { + console.error(`Test is running slow: ${testCase}`); + }, 2 * 60_000); + const killer = setTimeout(() => { + console.error( + `Test ran far too long, terminating with extreme prejudice: ${testCase}`, + ); + command.kill(); + }, 10 * 60_000); const { code, stdout, stderr } = await command.output(); + clearTimeout(warner); + clearTimeout(killer); if (code !== 0) { // If the test case failed, show the stdout, stderr, and instruction |