Unverified Commit 105e5b00 authored by Shu Ding's avatar Shu Ding Committed by GitHub

Add retry to the hmr acceptance test (#46902)

This one seems to be flaky ([example](https://github.com/vercel/next.js/actions/runs/4357945817/jobs/7618498044)) as the default `page.goto` timeout is set to 30s, while it already takes 15~20s to load locally on my laptop. So let's add some retries here.
parent 85ec94ff
import { createNextDescribe, FileRef } from 'e2e-utils'
import { check, hasRedbox, waitFor } from 'next-test-utils'
import { check, hasRedbox, waitFor, retry } from 'next-test-utils'
import path from 'path'
createNextDescribe(
......@@ -21,7 +21,11 @@ createNextDescribe(
},
({ next }) => {
it('should handle successive HMR changes with errors correctly', async () => {
const browser = await next.browser('/2020/develop-preview-test')
const browser = await retry(
() => next.browser('/2020/develop-preview-test'),
1000,
500
)
await check(
() => browser.eval('document.documentElement.innerHTML'),
......
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