Skip to content

test(explore): await the Customize tab click in ControlPanelsContainer test - #44315

Merged
rusackas merged 1 commit into
apache:masterfrom
SEPURI-SAI-KRISHNA:fix/flaky-control-panels-container-test
Sep 22, 2026
Merged

rusackas merged 1 commit into
apache:masterfrom
SEPURI-SAI-KRISHNA:fix/flaky-control-panels-container-test

Conversation

@SEPURI-SAI-KRISHNA

Copy link
Copy Markdown
Contributor

SUMMARY

ControlPanelsContainer › renders ControlPanelSections intermittently fails in sharded-jest-tests (4) with Expected length: 5, Received length: 4 (3 failures on 2026-09-14, one on master; details in #44314).

The test clicks the Customize tab without awaiting it. That was harmless under @testing-library/user-event 12, where click was synchronous, but #43512 moved the repo to 14, where every call returns a promise and dispatches its events across timer yields. With the call un-awaited, the following waitFor starts while the click is still in flight, so the click's dispatch time comes out of waitFor's 1000 ms budget. On a loaded runner that budget runs out before the Customize section renders.

This PR adds the missing await. It is the only un-awaited userEvent call in the file. The assertion is unchanged: no widened timeout, no retries.

Locally, instrumenting the test showed the click resolving +100 ms into waitFor (4 polls) without await, versus resolving before waitFor starts (1 poll) with it.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

N/A: test-only change.

TESTING INSTRUCTIONS

cd superset-frontend
npm run test -- src/explore/components/ControlPanelsContainer.test.tsx

All 11 tests pass (5/5 local runs on Node 24.16.0).

Note: I could not force the original failure locally. The unmodified test passed 12/12 runs under full CPU load, and shard 4 passed 3/3 runs pinned to 4 cores with coverage. The case for the fix is the CI history in the linked issue plus the timing measurement above.

ADDITIONAL INFORMATION

@bito-code-review

bito-code-review Bot commented Sep 15, 2026 •

Copy link
Copy Markdown
Contributor

Code Review Agent Run #b8ec0d

Actionable Suggestions - 0
Review Details
  • Files reviewed - 1 · Commit Range: f9d288a..f9d288a
    • superset-frontend/src/explore/components/ControlPanelsContainer.test.tsx
  • Files skipped - 0
  • Tools
    • Whispers (Secret Scanner) - ✔︎ Successful
    • Detect-secrets (Secret Scanner) - ✔︎ Successful

Bito Usage Guide

Commands

Type the following command in the pull request comment and save the comment.

  • /review - Manually triggers an incremental AI Review.

  • /review full - Manually triggers a full AI Review.

  • /pause - Pauses automatic reviews on this pull request.

  • /resume - Resumes automatic reviews.

  • /resolve - Marks all Bito-posted review comments as resolved.

  • /abort - Cancels all in-progress reviews.

Refer to the documentation for additional commands.

Configuration

This repository uses Superset You can customize the agent settings here or contact your Bito workspace admin at [email protected].

Documentation & Help

AI Code Review powered by Bito Logo

…r test

  user-event 14 made click() async; the un-awaited call let waitFor start
  while the click was still dispatching, spending its 1000ms budget on the
  click itself and intermittently failing on loaded CI runners.

  Fixes apache#44314
@SEPURI-SAI-KRISHNA
SEPURI-SAI-KRISHNA force-pushed the fix/flaky-control-panels-container-test branch from f9d288a to 29a12ee Compare September 16, 2026 02:13
@codecov

codecov Bot commented Sep 16, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 80.23%. Comparing base (9976e08) to head (29a12ee).

Additional details and impacted files
@@           Coverage Diff           @@
##           master   #44315   +/-   ##
=======================================
  Coverage   80.23%   80.23%           
=======================================
  Files        2927     2927           
  Lines      173273   173273           
  Branches    40173    40173           
=======================================
+ Hits       139027   139028    +1     
+ Misses      31646    31645    -1     
  Partials     2600     2600           
Flag Coverage Δ
javascript 75.67% <ø> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@bito-code-review

bito-code-review Bot commented Sep 16, 2026 •

Copy link
Copy Markdown
Contributor

Code Review Agent Run #68d202

Actionable Suggestions - 0
Review Details
  • Files reviewed - 1 · Commit Range: 29a12ee..29a12ee
    • superset-frontend/src/explore/components/ControlPanelsContainer.test.tsx
  • Files skipped - 0
  • Tools
    • Whispers (Secret Scanner) - ✔︎ Successful
    • Detect-secrets (Secret Scanner) - ✔︎ Successful

Bito Usage Guide

Commands

Type the following command in the pull request comment and save the comment.

  • /review - Manually triggers an incremental AI Review.

  • /review full - Manually triggers a full AI Review.

  • /pause - Pauses automatic reviews on this pull request.

  • /resume - Resumes automatic reviews.

  • /resolve - Marks all Bito-posted review comments as resolved.

  • /abort - Cancels all in-progress reviews.

Refer to the documentation for additional commands.

Configuration

This repository uses Superset You can customize the agent settings here or contact your Bito workspace admin at [email protected].

Documentation & Help

AI Code Review powered by Bito Logo

@mikebridge mikebridge left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Reviewed at 29a12ee, no actionable findings.

Awaiting the user-event v14 click correctly sequences the interaction before the existing waitFor. Both the four-panel and five-panel assertions remain intact, without increased timeouts, retries, or production changes. Current-head CI is green, including all eight Jest shards.

Validation limit: this was a source review plus CI-status verification; we did not run local tests or independently reproduce the original intermittent failure. The timing measurements remain author-reported evidence.

Approved. Review prepared and posted by Codex at Mike Bridge’s request.

@rusackas rusackas left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Nice catch on the user-event v14 timing shift, that explains the flakiness well. LGTM, approving!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Flaky CI: sharded-jest-tests (4) — ControlPanelsContainer.test.tsx "renders ControlPanelSections" (un-awaited userEvent.click after user-event v14)

3 participants