From 4cc0f6fb781a3efe6b018aa4ef410e4196c03ecf Mon Sep 17 00:00:00 2001 From: John Kleinschmidt Date: Mon, 4 Sep 2023 08:08:26 -0400 Subject: [PATCH] test: fix flaky content tracing test (#39682) --- spec/api-content-tracing-spec.ts | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/spec/api-content-tracing-spec.ts b/spec/api-content-tracing-spec.ts index 0cb905df239..dbf6b025e8a 100644 --- a/spec/api-content-tracing-spec.ts +++ b/spec/api-content-tracing-spec.ts @@ -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++;