Skip to content

Commit

Permalink
Tweak test retries for invalid-href suite (vercel#15459)
Browse files Browse the repository at this point in the history
- Reduce jest retries to 2 for a total of 3 attempts
- Disable retries in `invalid-href` test. I noticed jest retries don't help when this test fails (see log output of https://github.com/vercel/next.js/runs/904147534).
  • Loading branch information
Janpot authored Jul 24, 2020
1 parent c5f29b7 commit e6e2722
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion run-tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ const TIMINGS_API = `https://next-timings.jjsweb.site/api/timings`
{
stdio: 'inherit',
env: {
JEST_RETRY_TIMES: 3,
JEST_RETRY_TIMES: 2,
...process.env,
...(isAzure
? {
Expand Down
6 changes: 5 additions & 1 deletion test/integration/invalid-href/test/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import {
import webdriver from 'next-webdriver'
import { join } from 'path'

jest.setTimeout(1000 * 60 * 2)
jest.setTimeout(1000 * 60 * 1)

let app
let appPort
Expand All @@ -23,6 +23,10 @@ const appDir = join(__dirname, '..')
const firstErrorRegex = /Invalid href passed to router: mailto:[email protected].*invalid-href-passed/
const secondErrorRegex = /Invalid href passed to router: .*google\.com.*invalid-href-passed/

// This test doesn't seem to benefit from retries, let's disable them until the test gets fixed
// to prevent long running times
jest.retryTimes(0)

const showsError = async (pathname, regex, click = false, isWarn = false) => {
const browser = await webdriver(appPort, pathname)
try {
Expand Down

0 comments on commit e6e2722

Please sign in to comment.