Skip to content

fix(playwright): bump per-test timeout 30s -> 60s for graph render#214

Merged
avrabe merged 1 commit intomainfrom
fix/playwright-timeout-bump
Apr 26, 2026
Merged

fix(playwright): bump per-test timeout 30s -> 60s for graph render#214
avrabe merged 1 commit intomainfrom
fix/playwright-timeout-bump

Conversation

@avrabe
Copy link
Copy Markdown
Contributor

@avrabe avrabe commented Apr 25, 2026

Why

Latest CI on main showed the diagram-viewer.spec.ts:graph tests failing despite the ?limit=2000 fix in cc8403e. Page snapshot from the failed retry shows the graph did render ("742 nodes, 1477 edges"), but layout + SVG generation took ~25-30s synchronously in render_graph_view, leaving <5s for the .toBeVisible() assertion before the 30s test timeout fired.

Fix

Bump the global per-test timeout from 30s to 60s in playwright.config.ts. Most tests complete in <2s so the bump is inert; it specifically unblocks the SVG-heavy diagram-viewer assertions.

Future work (separate PR)

The real fix is moving graph layout/SVG out of the synchronous response (lazy-load via HTMX). Tracked as a follow-up; this timeout bump unblocks CI now.

Test plan

  • Local edit applied
  • CI runs Playwright with new timeout
  • All 4 diagram-viewer tests (graph + schema-linkage × toolbar + fullscreen) pass

Latest CI on main showed the diagram-viewer.spec.ts:graph tests still
failing despite cc8403e's ?limit=2000 — the graph DID render (page
snapshot shows "742 nodes, 1477 edges") but layout + SVG generation
took ~25-30s synchronously in render_graph_view, leaving <5s for the
.toBeVisible() assertion before the 30s test timeout fired.

Bumping the global per-test timeout to 60s gives the heavy graph
render breathing room. Most tests complete in <2s so the bump is
inert for them; it specifically unblocks the SVG-heavy assertions on
the dogfood dataset.

A future optimization would move layout/SVG out of the synchronous
response (lazy-load via HTMX), but that's a code change for a
separate PR.

Trace: skip
@temper-pulseengine
Copy link
Copy Markdown

AI Code Review for PR #214

pulseengine/rivet:fix/playwright-timeout-bump → pulseengine/rivet:main

Summary of Changes

The PR addresses a timeout issue in the diagram-viewer.spec.ts tests by increasing the global per-test timeout from 30 seconds to 60 seconds. This change is necessary because the synchronous layout and SVG generation process for the graph view took more than 30 seconds, leaving insufficient time for the .toBeVisible() assertion.

Potential Bugs or Issues

  1. Increased Timeout: The increase in timeout might introduce additional latency if other tests are affected by it.
  2. Testing Stability: There is a risk that increasing the timeout could lead to intermittent test failures due to increased load times.

Security Concerns

There are no security concerns associated with this change as it involves modifying configuration files for testing purposes.

Suggestions for Improvement

  1. Lazy-Loading Graph Layout/SVG: The real fix should be moving graph layout and SVG generation into a lazy-load mechanism using HTMX, which would reduce the synchronous time required.
  2. Performance Monitoring: Implement performance monitoring to track the actual execution times of tests and adjust timeouts accordingly.
  3. Timeout Configuration Management: Consider having a centralized configuration file for timeout settings to manage them more easily across different environments.

Overall Assessment

The change is necessary to unblock CI runs that were failing due to test timeouts. However, it introduces potential issues with increased latency and testing stability. The suggestion to move graph layout/SVG generation into a lazy-load mechanism is the most promising long-term solution.


This review was generated by a local AI model. It is advisory only and may contain inaccuracies.

Reviewed at e8e79f9

Copy link
Copy Markdown

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Performance Alert ⚠️

Possible performance regression was detected for benchmark 'Rivet Criterion Benchmarks'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 1.20.

Benchmark suite Current: e8e79f9 Previous: 77fa2e0 Ratio
store_lookup/100 2103 ns/iter (± 12) 1685 ns/iter (± 23) 1.25
store_lookup/1000 26010 ns/iter (± 141) 19210 ns/iter (± 128) 1.35
traceability_matrix/1000 59942 ns/iter (± 890) 40182 ns/iter (± 516) 1.49
query/100 779 ns/iter (± 2) 645 ns/iter (± 1) 1.21
query/1000 7146 ns/iter (± 27) 5456 ns/iter (± 91) 1.31

This comment was automatically generated by workflow using github-action-benchmark.

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 26, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@avrabe avrabe merged commit 58801b6 into main Apr 26, 2026
21 of 27 checks passed
@avrabe avrabe deleted the fix/playwright-timeout-bump branch April 26, 2026 10:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant