From 46ce438b6d0013135a13ac5f64997720d334a326 Mon Sep 17 00:00:00 2001 From: Pete Sage <76050312+PeteRager@users.noreply.github.com> Date: Tue, 12 Mar 2024 16:14:27 -0400 Subject: [PATCH] Sonos reduce test time (#111688) --- tests/components/sonos/test_init.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/tests/components/sonos/test_init.py b/tests/components/sonos/test_init.py index c073f9f636e..17e04e64749 100644 --- a/tests/components/sonos/test_init.py +++ b/tests/components/sonos/test_init.py @@ -369,7 +369,7 @@ async def test_async_poll_manual_hosts_6( "homeassistant.components.sonos.DISCOVERY_INTERVAL" ) as mock_discovery_interval: # Speed up manual discovery interval so second iteration runs sooner - mock_discovery_interval.total_seconds = Mock(side_effect=[0.5, 60]) + mock_discovery_interval.total_seconds = Mock(side_effect=[0.0, 60]) await _setup_hass(hass) assert "media_player.bedroom" in entity_registry.entities @@ -377,10 +377,6 @@ async def test_async_poll_manual_hosts_6( with caplog.at_level(logging.DEBUG): caplog.clear() - # The discovery events should not fire, wait with a timeout. - with pytest.raises(TimeoutError): - async with asyncio.timeout(1.0): - await speaker_1_activity.event.wait() await hass.async_block_till_done() assert "Activity on Living Room" not in caplog.text assert "Activity on Bedroom" not in caplog.text