test: fix flaky content tracing test (#39682)
This commit is contained in:
parent
f27b034045
commit
4cc0f6fb78
1 changed files with 4 additions and 6 deletions
|
@ -5,8 +5,8 @@ import * as path from 'node:path';
|
|||
import { setTimeout } from 'node:timers/promises';
|
||||
import { ifdescribe } from './lib/spec-helpers';
|
||||
|
||||
// FIXME: The tests are skipped on arm/arm64 and ia32.
|
||||
ifdescribe(!(['arm', 'arm64', 'ia32'].includes(process.arch)))('contentTracing', () => {
|
||||
// FIXME: The tests are skipped on linux arm/arm64
|
||||
ifdescribe(!(['arm', 'arm64'].includes(process.arch)) || (process.platform !== 'linux'))('contentTracing', () => {
|
||||
const record = async (options: TraceConfig | TraceCategoriesAndOptions, outputFilePath: string | undefined, recordTimeInMilliseconds = 1e1) => {
|
||||
await app.whenReady();
|
||||
|
||||
|
@ -120,9 +120,7 @@ ifdescribe(!(['arm', 'arm64', 'ia32'].includes(process.arch)))('contentTracing',
|
|||
|
||||
describe('captured events', () => {
|
||||
it('include V8 samples from the main process', async function () {
|
||||
// This test is flaky on macOS CI.
|
||||
this.retries(3);
|
||||
|
||||
this.timeout(60000);
|
||||
await contentTracing.startRecording({
|
||||
categoryFilter: 'disabled-by-default-v8.cpu_profiler',
|
||||
traceOptions: 'record-until-full'
|
||||
|
@ -131,7 +129,7 @@ ifdescribe(!(['arm', 'arm64', 'ia32'].includes(process.arch)))('contentTracing',
|
|||
const start = Date.now();
|
||||
let n = 0;
|
||||
const f = () => {};
|
||||
while (Date.now() - start < 200 || n < 500) {
|
||||
while (Date.now() - start < 200 && n < 500) {
|
||||
await setTimeout(0);
|
||||
f();
|
||||
n++;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue