From b1b9151cd72128cadb7be540e123f93a8b3f5766 Mon Sep 17 00:00:00 2001 From: Alexa V <239999+axelavargas@users.noreply.github.com> Date: Wed, 21 May 2025 10:55:46 +0200 Subject: [PATCH] Chore: Fix Flaky test DashboardDatasourceBehaviour (#105682) Add spy to prevent flaky test --- .../scene/DashboardDatasourceBehaviour.test.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/public/app/features/dashboard-scene/scene/DashboardDatasourceBehaviour.test.tsx b/public/app/features/dashboard-scene/scene/DashboardDatasourceBehaviour.test.tsx index 55aac56789a..10989531ef4 100644 --- a/public/app/features/dashboard-scene/scene/DashboardDatasourceBehaviour.test.tsx +++ b/public/app/features/dashboard-scene/scene/DashboardDatasourceBehaviour.test.tsx @@ -596,6 +596,10 @@ describe('DashboardDatasourceBehaviour', () => { }); it('Should re-run query after transformations reprocess', async () => { + // sometimes this tests fails with a console error `AggregateError` with an XMLHttpRequest component + // this is not related to the test, but a side effect of the interaction with scenes, mixed ds or even js dom + // considering it a flaky test, we are explicitly ignoring it by mocking console.error + jest.spyOn(console, 'error').mockImplementation(); const sourcePanel = new VizPanel({ title: 'Panel A', pluginId: 'table',