From e934f2af9273575f326bb155db3a0f60f2cebb4d Mon Sep 17 00:00:00 2001 From: Joe Li Date: Fri, 8 May 2026 14:27:03 -0700 Subject: [PATCH] fix(tests): prevent jest hangs caused by MessageChannel-mocked React scheduler (#39957) Co-authored-by: Claude Opus 4.6 --- .../src/components/Select/Select.test.tsx | 2 +- .../QueryAutoRefresh.test.tsx | 2 +- .../SaveDatasetModal.test.tsx | 2 +- .../components/Header/Header.test.tsx | 2 +- .../FilterBar/FilterBar.test.tsx | 2 +- .../__tests__/TreeInitialization.test.tsx | 2 +- .../__tests__/TreeSelection.test.tsx | 2 +- .../TimeGrainPreFilter.test.tsx | 2 +- .../tests/CustomFrame.test.tsx | 2 +- .../VizTypeControl/VizTypeControl.test.tsx | 2 +- .../SemanticLayerModal.test.tsx | 2 +- .../Select/SelectFilterPlugin.test.tsx | 18 ++++++------ .../pages/DatasetList/DatasetList.test.tsx | 7 +++-- .../src/pages/FileHandler/index.test.tsx | 29 +++++++++++++++---- 14 files changed, 48 insertions(+), 28 deletions(-) diff --git a/superset-frontend/packages/superset-ui-core/src/components/Select/Select.test.tsx b/superset-frontend/packages/superset-ui-core/src/components/Select/Select.test.tsx index 2f8cb6860a2..2b558b072cb 100644 --- a/superset-frontend/packages/superset-ui-core/src/components/Select/Select.test.tsx +++ b/superset-frontend/packages/superset-ui-core/src/components/Select/Select.test.tsx @@ -1160,7 +1160,7 @@ test('does not fire onChange if the same value is selected in single mode', asyn // Reference for the bug this tests: https://github.com/apache/superset/pull/33043#issuecomment-2809419640 test('typing and deleting the last character for a new option displays correctly', async () => { - jest.useFakeTimers(); + jest.useFakeTimers({ advanceTimers: true }); render(