Commit 499f5e19 authored by Hendrik Liebau's avatar Hendrik Liebau Committed by Jiachi Liu

[test] Increase response timeout in `next.browserWithResponse()` (#85911)

The `next.browserWithResponse()` test helper is currently only used in
the `fallback-shells` test suite, which frequently times out after 10
seconds in CI, because the initial compilation for the first request can
take quite a while when there's resource contention. Increasing the
timeout to 30 seconds should help mitigate these issues. We could also
consider removing the timeout entirely. Playwright also doesn't use a
timeout per default for the `page.goto()` method, which we use for
`next.browser()` and `next.browserWithResponse()` under the hood.
parent 05f71f96
...@@ -19,7 +19,7 @@ describe('fallback-shells', () => { ...@@ -19,7 +19,7 @@ describe('fallback-shells', () => {
} }
// If we didn't use the fallback shell, then we didn't postpone the // If we didn't use the fallback shell, then we didn't postpone the
// response and therefore shouldn't have sent the postponed header. // response, and therefore shouldn't have sent the postponed header.
expect(headers['x-nextjs-postponed']).not.toBe('1') expect(headers['x-nextjs-postponed']).not.toBe('1')
}) })
}) })
......
...@@ -784,7 +784,7 @@ export class NextInstance { ...@@ -784,7 +784,7 @@ export class NextInstance {
const responsePromise = new Promise<Response>((resolve, reject) => { const responsePromise = new Promise<Response>((resolve, reject) => {
const timer = setTimeout(() => { const timer = setTimeout(() => {
reject(`Timed out waiting for the response of ${url}`) reject(`Timed out waiting for the response of ${url}`)
}, 10_000) }, 30_000)
resolveResponse = (response: Response) => { resolveResponse = (response: Response) => {
clearTimeout(timer) clearTimeout(timer)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment