Skip to content

Fixed flaky configOverrideSection integration test timeout in CI#1514

Draft
carterworks wants to merge 9 commits into
mainfrom
fix-flakey-config-overrides-test
Draft

Fixed flaky configOverrideSection integration test timeout in CI#1514
carterworks wants to merge 9 commits into
mainfrom
fix-flakey-config-overrides-test

Conversation

@carterworks
Copy link
Copy Markdown
Collaborator

Changed Packages

  • core
  • reactor-extension

Description

Fixed an intermittent test timeout in the configOverrideSection integration test suite. The failing test (Config overrides section > updates form values and saves to settings) was hitting the 30 s vitest timeout in CI while passing locally.

Root cause: Under headless CI conditions, playwright's actionability checks wait for react-spectrum dropdown overlay animations to fully settle before registering a click. The selectOption() helper has a 5 s click timeout × 3 retries = up to 15 s per call. With multiple selectOption() calls in sequence, total accumulated wait time could exceed the 30 s test timeout before the retry logic even had a chance to throw an error.

Fix:

  1. Injected a CSS <style> block in the integration test setup that sets animation-duration, animation-delay, transition-duration, and transition-delay to 0s for all elements. Dropdown overlays that previously animated in over ~200 ms (slower under CI load) now appear instantly, making playwright actionability checks succeed immediately.
  2. Added retry: 2 to the vitest reactor-extension/integration project config as a safety net for any remaining transient flakiness.

Also removed the deprecated --browser.provider=playwright CLI flag from the test:unit:debug and test:integration:debug npm scripts — the provider is already fully configured in vitest.projects.js and the flag was a no-op after recent vitest upgrades.

Related Issue

CI failure: https://github.com/adobe/alloy/actions/runs/26183634291/job/77033100029

Motivation and Context

This test was observed failing in CI with Error: Test timed out in 30000ms. The flakiness is timing-dependent and only reproduced under headless CI conditions, not locally in headed mode.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)

Checklist:

  • I have added a Changeset file with a consumer-facing description of my changes.
  • I have signed the Adobe Open Source CLA or I'm an Adobe employee.
  • I have made any necessary test changes and all tests pass.
  • I have run the Sandbox successfully.

  vitest 4.1.5 requires the browser provider to be configured via a factory
  in the vitest config rather than a CLI string. The config already uses the
  playwright() factory from @vitest/browser-playwright.
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 21, 2026

⚠️ No Changeset found

Latest commit: 615a7be

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@carterworks carterworks marked this pull request as draft May 21, 2026 21:12
The earlier commit assumed react-spectrum overlay animations were what
was blowing playwright's actionability budget in CI. They aren't:
react-spectrum's Popover uses <Transition timeout={{enter: 0, exit: 350}}>
so the enter animation is already instantaneous and the exit doesn't
gate actionability checks. The real cause is React commit latency under
CI CPU load when a Formik field update conditionally mounts the next
field in the test's sequence; that's being fixed at the test level.
…it latency in CI

In the configOverrideSection 'updates form values and saves to settings'
test, each selectOption('Enabled') conditionally mounts the next field
via Formik. Under CI CPU load the next field isn't fully committed by
React when the test tries to interact with it, blowing the 2s
actionability budget and burning retries until the 30s test timeout
fires. Wait for the field to be visible before opening its dropdown,
matching the existing pattern used for experiencePlatformEnabled.
…ate leakage

browser/integration runs with isolate: false + fileParallelism: true,
so all advertising test files share one browser context and one cookie
jar. Once any test fires markIdsAsConverted (via handleViewThrough),
the resulting \${idType}_last_conversion entries persist for 30 minutes
inside the kndctr_<orgId>_advertising cookie. Subsequent runs of
viewthrough_ids.spec.js see SURFER_ID as throttled, which both
short-circuits collectAllIdentities (no enrichment call sent) and
trips onBeforeSendEvent's early-return (no query.advertising on the
sendEvent), making it structurally impossible for the test to find a
view-through call.

Clean up alloy-namespaced cookies in cleanAlloy() so each test starts
from a fresh state.
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