From dad7de2b12aba42fb5ac107096cc46c0361cbca7 Mon Sep 17 00:00:00 2001 From: Vladimir Filonov Date: Mon, 4 Nov 2024 17:09:56 +0400 Subject: [PATCH] Add sleep to test_get_alerts_data_for_incident --- tests/test_incidents.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/test_incidents.py b/tests/test_incidents.py index 001d7c0d2..de573df3f 100644 --- a/tests/test_incidents.py +++ b/tests/test_incidents.py @@ -42,8 +42,12 @@ def test_get_alerts_data_for_incident(db_session, create_alert): }, ) + sleep(0.5) + alerts = db_session.query(Alert).all() + assert len(alerts) == 100 + unique_fingerprints = db_session.query( func.count(distinct(Alert.fingerprint)) ).scalar()