Unverified Commit 5dd0400a authored by vercel-fleet-prod[bot]'s avatar vercel-fleet-prod[bot] Committed by GitHub

Use waitFor in static shell retry test

Co-authored-by: 's avatarWill Binns-Smith <755844+wbinnssmith@users.noreply.github.com>
parent a4dd234d
import { isNextDeploy, nextTestSetup } from 'e2e-utils' import { isNextDeploy, nextTestSetup } from 'e2e-utils'
import type * as Playwright from 'playwright' import type * as Playwright from 'playwright'
import { createRouterAct } from 'router-act' import { createRouterAct } from 'router-act'
import { retry } from '../../../../lib/next-test-utils' import { retry, waitFor } from '../../../../lib/next-test-utils'
const REPRODUCE_UNNECESSARY_RUNTIME_PREFETCH = const REPRODUCE_UNNECESSARY_RUNTIME_PREFETCH =
!!process.env.REPRODUCE_UNNECESSARY_RUNTIME_PREFETCH || false !!process.env.REPRODUCE_UNNECESSARY_RUNTIME_PREFETCH || false
...@@ -2500,9 +2500,7 @@ describe('static App Shell prefetch attempt', () => { ...@@ -2500,9 +2500,7 @@ describe('static App Shell prefetch attempt', () => {
for (let attempt = 1; attempt <= maxAttempts; attempt++) { for (let attempt = 1; attempt <= maxAttempts; attempt++) {
try { try {
await act(async () => { await act(async () => {
await new Promise<void>((resolve) => await waitFor(interval + 500)
setTimeout(resolve, interval + 500)
)
}, [ }, [
// Static prefetch // Static prefetch
{ {
......
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