From dc04da49415a65ff0afa69b9043da46cd6750132 Mon Sep 17 00:00:00 2001 From: Erwin Douna Date: Wed, 30 Sep 2026 09:05:30 +0200 Subject: [PATCH] Skip subscribe cooldowns in slow MQTT tests (#183684) --- tests/components/mqtt/test_client.py | 3 +++ tests/components/mqtt/test_init.py | 2 ++ 2 files changed, 5 insertions(+) diff --git a/tests/components/mqtt/test_client.py b/tests/components/mqtt/test_client.py index 9d9dd713822a..d67d3f247fb0 100644 --- a/tests/components/mqtt/test_client.py +++ b/tests/components/mqtt/test_client.py @@ -454,6 +454,9 @@ async def test_subscribe_and_resubscribe( mqtt_client_mock.unsubscribe.assert_called_once_with(["test-topic"]) +@patch("homeassistant.components.mqtt.client.INITIAL_SUBSCRIBE_COOLDOWN", 0.0) +@patch("homeassistant.components.mqtt.client.SUBSCRIBE_COOLDOWN", 0.0) +@patch("homeassistant.components.mqtt.client.UNSUBSCRIBE_COOLDOWN", 0.0) async def test_subscribe_topic_non_async( hass: HomeAssistant, mock_debouncer: asyncio.Event, diff --git a/tests/components/mqtt/test_init.py b/tests/components/mqtt/test_init.py index 5493d93a44f4..338c63869379 100644 --- a/tests/components/mqtt/test_init.py +++ b/tests/components/mqtt/test_init.py @@ -802,6 +802,8 @@ async def test_receiving_message_with_non_utf8_topic_gets_logged( @pytest.mark.usefixtures("mqtt_client_mock") +@patch("homeassistant.components.mqtt.client.INITIAL_SUBSCRIBE_COOLDOWN", 0.0) +@patch("homeassistant.components.mqtt.client.SUBSCRIBE_COOLDOWN", 0.0) async def test_reload_entry_with_restored_subscriptions( hass: HomeAssistant, mock_debouncer: asyncio.Event,