Skip to content

Commit f45d60f

Browse files
unstubbablehuozhi
authored andcommitted
[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.
1 parent 8687113 commit f45d60f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

test/e2e/app-dir/fallback-shells/fallback-shells.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ describe('fallback-shells', () => {
1919
}
2020

2121
// If we didn't use the fallback shell, then we didn't postpone the
22-
// response and therefore shouldn't have sent the postponed header.
22+
// response, and therefore shouldn't have sent the postponed header.
2323
expect(headers['x-nextjs-postponed']).not.toBe('1')
2424
})
2525
})

test/lib/next-modes/base.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -784,7 +784,7 @@ export class NextInstance {
784784
const responsePromise = new Promise<Response>((resolve, reject) => {
785785
const timer = setTimeout(() => {
786786
reject(`Timed out waiting for the response of ${url}`)
787-
}, 10_000)
787+
}, 30_000)
788788

789789
resolveResponse = (response: Response) => {
790790
clearTimeout(timer)

0 commit comments

Comments
 (0)