Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: flaky system-tests-firefox job #18848

Merged
merged 10 commits into from
Nov 15, 2021
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
6 changes: 5 additions & 1 deletion system-tests/lib/system-tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -432,6 +432,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 Expand Up @@ -964,7 +966,9 @@ const systemTests = {
throw err
}

console.log('(system tests warning) Firefox failed to process the video, but this is being ignored due to known issues with video processing in Firefox.')
if (isVideoSnapshotError(err)) {
console.log('(system tests warning) Firefox failed to process the video, but this is being ignored due to known issues with video processing in Firefox.')
}
davidmunechika marked this conversation as resolved.
Show resolved Hide resolved
}
}

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