Skip to content

Commit

Permalink
fix: flaky system-tests-firefox job (#18848)
Browse files Browse the repository at this point in the history
Co-authored-by: Zach Bloomquist <github@chary.us>
  • Loading branch information
davidmunechika and flotwig committed Nov 15, 2021
1 parent 50d1070 commit 941cef1
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion packages/server/lib/errors.js
Original file line number Diff line number Diff line change
Expand Up @@ -879,7 +879,7 @@ const getMsgByType = function (type, arg1 = {}, arg2, arg3) {
${arg1.stack}`
case 'CDP_RETRYING_CONNECTION':
return `Failed to connect to ${arg2}, retrying in 1 second (attempt ${chalk.yellow(arg1)}/62)`
return `Still waiting to connect to ${arg2}, retrying in 1 second (attempt ${chalk.yellow(arg1)}/62)`
case 'DEPRECATED_BEFORE_BROWSER_LAUNCH_ARGS':
return stripIndent`\
Deprecation Warning: The \`before:browser:launch\` plugin event changed its signature in version \`4.0.0\`
Expand Down
4 changes: 2 additions & 2 deletions packages/server/test/unit/browsers/protocol_spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ describe('lib/browsers/protocol', () => {
log.getCalls().forEach((log, i) => {
const line = stripAnsi(log.args[0])

expect(line).to.include(`Failed to connect to FooBrowser, retrying in 1 second (attempt ${i + 18}/62)`)
expect(line).to.include(`Still waiting to connect to FooBrowser, retrying in 1 second (attempt ${i + 18}/62)`)
})

snapshot(delays)
Expand Down Expand Up @@ -180,7 +180,7 @@ describe('lib/browsers/protocol', () => {
log.getCalls().forEach((log, i) => {
const line = stripAnsi(log.args[0])

expect(line).to.include(`Failed to connect to FooBrowser, retrying in 1 second (attempt ${i + 18}/62)`)
expect(line).to.include(`Still waiting to connect to FooBrowser, retrying in 1 second (attempt ${i + 18}/62)`)
})
})
})
Expand Down
2 changes: 2 additions & 0 deletions system-tests/lib/system-tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -441,6 +441,8 @@ const normalizeStdout = function (str, options: any = {}) {
.replace(/^(\- )(\/.*\/packages\/server\/)(.*)$/gm, '$1$3')
// Different browsers have different cross-origin error messages
.replace(crossOriginErrorRe, '[Cross origin error message]')
// Replaces connection warning since Firefox sometimes takes longer to connect
.replace(/Still waiting to connect to Firefox, retrying in 1 second \(attempt .+\/.+\)/g, '')

if (options.sanitizeScreenshotDimensions) {
// screenshot dimensions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ describe('taking screenshots', () => {
const total = first + second + third + fourth
const padding = 2000 // account for slower machines

expect(duration).to.be.within(total, total + padding)
expect(duration).to.be.within(total - padding, total + padding)
},
})
})
Expand Down

3 comments on commit 941cef1

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 941cef1 Nov 15, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Circle has built the linux x64 version of the Test Runner.

Learn more about this pre-release platform-specific build at https://on.cypress.io/installing-cypress#Install-pre-release-version.

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/9.0.1/circle-develop-941cef10a087d0bb3c924d95be2cfbc36efc7b91/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 941cef1 Nov 15, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AppVeyor has built the win32 x64 version of the Test Runner.

Learn more about this pre-release platform-specific build at https://on.cypress.io/installing-cypress#Install-pre-release-version.

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/9.0.1/appveyor-develop-941cef10a087d0bb3c924d95be2cfbc36efc7b91/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 941cef1 Nov 15, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Circle has built the darwin x64 version of the Test Runner.

Learn more about this pre-release platform-specific build at https://on.cypress.io/installing-cypress#Install-pre-release-version.

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/9.0.1/circle-develop-941cef10a087d0bb3c924d95be2cfbc36efc7b91/cypress.tgz

Please sign in to comment.