perfetto icon indicating copy to clipboard operation
perfetto copied to clipboard

Flaky ui/run-integrationtests

Open sashwinbalaji opened this issue 10 months ago • 4 comments

Tests are timing out and happening sometimes in CI also.

On running:

clear; ui/run-integrationtests --rebaseline
  1) [chromium] › test/track_event_description.test.ts:76:7 › Android log track description ────────
    Test timeout of 60000ms exceeded.
    Error: page.waitForSelector: Test ended.
    Call log:
      - waiting for locator('input.trace_file')
        at PerfettoTestHelper.openTraceFile (/usr/local/google/home/sashwinbalaji/Desktop/perfetto/ui/src/test/perfetto_ui_test_helper.ts:65:34)
        at /usr/local/google/home/sashwinbalaji/Desktop/perfetto/ui/src/test/track_event_description.test.ts:77:5

Now if set workers = 1, the tests pass but with below warning:

clear; ui/run-integrationtests --rebaseline --workers=1
  Slow test file: [chromium] › test/startup_commands_allowlist.test.ts (2.0m)
  Slow test file: [chromium] › test/table_viewer.test.ts (1.1m)
  Slow test file: [chromium] › test/track_event_description.test.ts (29.9s)
  Slow test file: [chromium] › test/wattson.test.ts (16.6s)
  Consider splitting slow test files to speed up parallel execution
  74 passed (9.2m)

To open last HTML report run:

sashwinbalaji avatar Jan 30 '26 10:01 sashwinbalaji

Should be fixed by https://github.com/google/perfetto/pull/4642

LalitMaganti avatar Feb 02 '26 22:02 LalitMaganti

These are happening again :(

e.g. https://github.com/google/perfetto/actions/runs/23811031635/job/69397821301

4 failed [chromium] › src/test/chrome_scroll_jank_plugin.test.ts:78:5 › event_latency_track ───────────── [chromium] › src/test/chrome_scroll_jank_plugin.test.ts:127:5 › scroll_timeline_track ────────── [chromium] › src/test/chrome_scroll_jank_plugin.test.ts:177:5 › scroll_timeline_v4_track ─────── [chromium] › src/test/local_cache_key.test.ts:18:5 › multiple traces via url and local_cache_key

 Retry #1 ───────────────────────────────────────────────────────────────────────────────────────

    Test timeout of 30000ms exceeded.

    Error: page.waitForFunction: Target page, context or browser has been closed

       at test/perfetto_ui_test_helper.ts:89

      87 |
      88 |   async waitForPerfettoIdle(idleHysteresisMs?: number): Promise<void> {
    > 89 |     await this.page.waitForFunction(
         |                     ^
      90 |       () =>
      91 |         typeof (window as {} as {waitForPerfettoIdle?: unknown})
      92 |           .waitForPerfettoIdle === 'function',
        at PerfettoTestHelper.waitForPerfettoIdle (/tmp/github-action-runner/_work/perfetto/perfetto/ui/src/test/perfetto_ui_test_helper.ts:89:21)
        at PerfettoTestHelper.waitForIdleAndScreenshot (/tmp/github-action-runner/_work/perfetto/perfetto/ui/src/test/perfetto_ui_test_helper.ts:106:16)
        at /tmp/github-action-runner/_work/perfetto/perfetto/ui/src/test/chrome_scroll_jank_plugin.test.ts:95:3

sashwinbalaji avatar Mar 31 '26 17:03 sashwinbalaji

Ack. Haven't seen this personally, please post it here if you see it again.

stevegolton avatar Apr 02 '26 10:04 stevegolton

I think I haven't seen this happen again. Steve has fixed more cases. Please reopen again if it's happening.

LalitMaganti avatar Jul 08 '26 00:07 LalitMaganti