mirror of
https://github.com/apache/superset.git
synced 2026-05-21 15:55:10 +00:00
DatasourceControl.test.tsx consistently OOM-crashes Jest workers in CI (shard 7) because the last 4 tests render the full DatasourceEditor (2,500+ lines, 150+ imports) without mocking. Each test mounts this massive tree, compounding memory until crash. Mock DatasourceEditor with a lightweight stub since these tests only verify DatasourceControl's callback wiring through the modal save flow, not editor internals. Also remove stale SupersetClientGet.mockImplementationOnce calls from 2 earlier tests that leaked unconsumed mocks into subsequent tests (jest.clearAllMocks doesn't clear mock implementations). Results: heap 615MB→501MB, test time 33s→20s, heavy tests 5500ms→118ms. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>