Files
superset2/superset-frontend
Evan Rusackas db03fb10e6 test(DatasourceControl): mock DatasourceEditor to fix CI OOM crashes
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>
2026-03-02 12:08:36 -08:00
..