mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
ci: fix flaky test (#10335)
This commit is contained in:
parent
60acefc1d6
commit
dde569b97d
@ -14,6 +14,10 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
let timeout = process.platform === 'win32' ? 20_000 : 10_000;
|
||||||
|
if (!!process.env.DEBUGGER_ATTACHED) {
|
||||||
|
timeout = 0;
|
||||||
|
}
|
||||||
module.exports = {
|
module.exports = {
|
||||||
reporter: 'dot',
|
reporter: 'dot',
|
||||||
logLevel: 'debug',
|
logLevel: 'debug',
|
||||||
@ -22,6 +26,6 @@ module.exports = {
|
|||||||
exit: !!process.env.CI,
|
exit: !!process.env.CI,
|
||||||
retries: process.env.CI ? 3 : 0,
|
retries: process.env.CI ? 3 : 0,
|
||||||
parallel: !!process.env.PARALLEL,
|
parallel: !!process.env.PARALLEL,
|
||||||
timeout: process.platform === 'win32' ? 20_000 : 10_000,
|
timeout: timeout,
|
||||||
reporter: process.env.CI ? 'spec' : 'dot',
|
reporter: process.env.CI ? 'spec' : 'dot',
|
||||||
};
|
};
|
||||||
|
5
.vscode/launch.template.json
vendored
5
.vscode/launch.template.json
vendored
@ -37,7 +37,10 @@
|
|||||||
"--no-coverage",
|
"--no-coverage",
|
||||||
"--no-suggestions"
|
"--no-suggestions"
|
||||||
],
|
],
|
||||||
"outFiles": ["${workspaceFolder}/**/*.js"]
|
"outFiles": ["${workspaceFolder}/**/*.js"],
|
||||||
|
"env": {
|
||||||
|
"DEBUGGER_ATTACHED": true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -819,7 +819,9 @@ describe('network', function () {
|
|||||||
});
|
});
|
||||||
|
|
||||||
const [response] = await Promise.all([
|
const [response] = await Promise.all([
|
||||||
waitEvent<HTTPResponse>(page, 'response'),
|
waitEvent<HTTPResponse>(page, 'response', res => {
|
||||||
|
return !isFavicon(res);
|
||||||
|
}),
|
||||||
page.evaluate(() => {
|
page.evaluate(() => {
|
||||||
const xhr = new XMLHttpRequest();
|
const xhr = new XMLHttpRequest();
|
||||||
xhr.open('GET', '/foo');
|
xhr.open('GET', '/foo');
|
||||||
|
Loading…
Reference in New Issue
Block a user