mirror of
https://github.com/cypress-io/cypress.git
synced 2026-02-09 08:40:32 -06:00
fix: flaky system-tests-firefox job (#18848)
Co-authored-by: Zach Bloomquist <github@chary.us>
This commit is contained in:
@@ -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\`
|
||||
|
||||
@@ -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)
|
||||
@@ -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)`)
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
},
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user