From 27b5a9e074cf881a70d064106c8573264ea869bc Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Fri, 20 Oct 2023 08:09:59 -1000 Subject: [PATCH] Reduce number of test states in big purge test to fix CI (#102401) --- tests/components/recorder/test_purge.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/components/recorder/test_purge.py b/tests/components/recorder/test_purge.py index eedbd2c0e29..4faa8dc7e8a 100644 --- a/tests/components/recorder/test_purge.py +++ b/tests/components/recorder/test_purge.py @@ -74,16 +74,16 @@ async def test_purge_big_database( instance = await async_setup_recorder_instance(hass) - for _ in range(25): + for _ in range(12): await _add_test_states(hass, wait_recording_done=False) await async_wait_recording_done(hass) - with patch.object(instance, "max_bind_vars", 100), patch.object( - instance.database_engine, "max_bind_vars", 100 + with patch.object(instance, "max_bind_vars", 72), patch.object( + instance.database_engine, "max_bind_vars", 72 ), session_scope(hass=hass) as session: states = session.query(States) state_attributes = session.query(StateAttributes) - assert states.count() == 150 + assert states.count() == 72 assert state_attributes.count() == 3 purge_before = dt_util.utcnow() - timedelta(days=4) @@ -96,7 +96,7 @@ async def test_purge_big_database( repack=False, ) assert not finished - assert states.count() == 50 + assert states.count() == 24 assert state_attributes.count() == 1