Unverified Commit 604b87cc authored by Hendrik Liebau's avatar Hendrik Liebau Committed by GitHub

Increase retry duration for HMR fetch logging tests (#71170)

As we've learned in #70467, compilation times can be quite high in CI,
when testing HMR behaviour. The fetch logging HMR tests are frequently
failing. Increasing the `retry` timeout should mitigate the flakiness.
parent 84ee9e69
...@@ -29,6 +29,7 @@ describe('server-components-hmr-cache', () => { ...@@ -29,6 +29,7 @@ describe('server-components-hmr-cache', () => {
await retry(async () => { await retry(async () => {
const updatedContent = await browser.elementById('content').text() const updatedContent = await browser.elementById('content').text()
expect(updatedContent).toBe('bar') expect(updatedContent).toBe('bar')
// TODO: remove custom duration in case we increase the default.
}, 5000) }, 5000)
const valueAfterPatch = await browser.elementById('value').text() const valueAfterPatch = await browser.elementById('value').text()
...@@ -45,6 +46,7 @@ describe('server-components-hmr-cache', () => { ...@@ -45,6 +46,7 @@ describe('server-components-hmr-cache', () => {
await retry(async () => { await retry(async () => {
const valueAfterRefresh = await browser.elementById('value').text() const valueAfterRefresh = await browser.elementById('value').text()
expect(valueBeforeRefresh).not.toEqual(valueAfterRefresh) expect(valueBeforeRefresh).not.toEqual(valueAfterRefresh)
// TODO: remove custom duration in case we increase the default.
}, 5000) }, 5000)
}) })
...@@ -65,6 +67,7 @@ describe('server-components-hmr-cache', () => { ...@@ -65,6 +67,7 @@ describe('server-components-hmr-cache', () => {
await retry(async () => { await retry(async () => {
const updatedContent = await browser.elementById('content').text() const updatedContent = await browser.elementById('content').text()
expect(updatedContent).toBe('bar') expect(updatedContent).toBe('bar')
// TODO: remove custom duration in case we increase the default.
}, 5000) }, 5000)
const valueAfterPatch = getLoggedAfterValue() const valueAfterPatch = getLoggedAfterValue()
...@@ -83,6 +86,7 @@ describe('server-components-hmr-cache', () => { ...@@ -83,6 +86,7 @@ describe('server-components-hmr-cache', () => {
await retry(async () => { await retry(async () => {
const valueAfterRefresh = getLoggedAfterValue() const valueAfterRefresh = getLoggedAfterValue()
expect(valueBeforeRefresh).not.toEqual(valueAfterRefresh) expect(valueBeforeRefresh).not.toEqual(valueAfterRefresh)
// TODO: remove custom duration in case we increase the default.
}, 5000) }, 5000)
}) })
}) })
...@@ -117,6 +121,7 @@ describe('server-components-hmr-cache', () => { ...@@ -117,6 +121,7 @@ describe('server-components-hmr-cache', () => {
await retry(async () => { await retry(async () => {
const updatedContent = await browser.elementById('content').text() const updatedContent = await browser.elementById('content').text()
expect(updatedContent).toBe('bar') expect(updatedContent).toBe('bar')
// TODO: remove custom duration in case we increase the default.
}, 5000) }, 5000)
const valueAfterPatch = await browser.elementById('value').text() const valueAfterPatch = await browser.elementById('value').text()
...@@ -144,6 +149,7 @@ describe('server-components-hmr-cache', () => { ...@@ -144,6 +149,7 @@ describe('server-components-hmr-cache', () => {
.elementById('content') .elementById('content')
.text() .text()
expect(updatedContent).toBe('bar') expect(updatedContent).toBe('bar')
// TODO: remove custom duration in case we increase the default.
}, 5000) }, 5000)
const valueAfterPatch = await retry(() => getLoggedAfterValue()) const valueAfterPatch = await retry(() => getLoggedAfterValue())
......
...@@ -242,7 +242,8 @@ describe('app-dir - logging', () => { ...@@ -242,7 +242,8 @@ describe('app-dir - logging', () => {
const logs = stripAnsi(next.cliOutput.slice(outputIndex)) const logs = stripAnsi(next.cliOutput.slice(outputIndex))
expect(logs).toInclude(' GET /fetch-no-store') expect(logs).toInclude(' GET /fetch-no-store')
expect(logs).not.toInclude(` │ GET `) expect(logs).not.toInclude(` │ GET `)
}) // TODO: remove custom duration in case we increase the default.
}, 5000)
) )
}) })
...@@ -285,7 +286,8 @@ describe('app-dir - logging', () => { ...@@ -285,7 +286,8 @@ describe('app-dir - logging', () => {
expect(logs).toInclude( expect(logs).toInclude(
` │ GET ${expectedUrl}?request-input 200 in 1ms (HMR cache)` ` │ GET ${expectedUrl}?request-input 200 in 1ms (HMR cache)`
) )
}) // TODO: remove custom duration in case we increase the default.
}, 5000)
} }
) )
}) })
......
...@@ -31,6 +31,7 @@ describe('on-request-error - basic', () => { ...@@ -31,6 +31,7 @@ describe('on-request-error - basic', () => {
expect(recordLogLines).toEqual( expect(recordLogLines).toEqual(
expect.arrayContaining([expect.stringContaining(errorMessage)]) expect.arrayContaining([expect.stringContaining(errorMessage)])
) )
// TODO: remove custom duration in case we increase the default.
}, 5000) }, 5000)
const json = await getOutputLogJson(next, outputLogPath) const json = await getOutputLogJson(next, outputLogPath)
......
...@@ -23,6 +23,7 @@ describe('on-request-error - dynamic-routes', () => { ...@@ -23,6 +23,7 @@ describe('on-request-error - dynamic-routes', () => {
expect(recordLogLines).toEqual( expect(recordLogLines).toEqual(
expect.arrayContaining([expect.stringContaining(errorMessage)]) expect.arrayContaining([expect.stringContaining(errorMessage)])
) )
// TODO: remove custom duration in case we increase the default.
}, 5000) }, 5000)
const json = await getOutputLogJson(next, outputLogPath) const json = await getOutputLogJson(next, outputLogPath)
......
...@@ -30,6 +30,7 @@ describe('on-request-error - server-action-error', () => { ...@@ -30,6 +30,7 @@ describe('on-request-error - server-action-error', () => {
expect(recordLogLines).toEqual( expect(recordLogLines).toEqual(
expect.arrayContaining([expect.stringContaining(errorMessage)]) expect.arrayContaining([expect.stringContaining(errorMessage)])
) )
// TODO: remove custom duration in case we increase the default.
}, 5000) }, 5000)
const json = await getOutputLogJson(next, outputLogPath) const json = await getOutputLogJson(next, outputLogPath)
......
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