mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 13:17:32 +00:00
Make sure ACK's are processed before mqtt tests are teared down (#120329)
This commit is contained in:
parent
57cdd33537
commit
389b9d1ad6
@ -1173,6 +1173,8 @@ async def test_cleanup_triggers_and_restoring_state(
|
||||
state = hass.states.get("binary_sensor.test2")
|
||||
assert state.state == state2
|
||||
|
||||
await hass.async_block_till_done(wait_background_tasks=True)
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
"hass_config",
|
||||
|
@ -240,6 +240,8 @@ async def test_device_tracker_discovery_update(
|
||||
# Entity was not updated as the state was not changed
|
||||
assert state.last_updated == datetime(2023, 8, 22, 19, 16, tzinfo=UTC)
|
||||
|
||||
await hass.async_block_till_done(wait_background_tasks=True)
|
||||
|
||||
|
||||
async def test_cleanup_device_tracker(
|
||||
hass: HomeAssistant,
|
||||
|
@ -222,6 +222,8 @@ async def test_setting_event_value_via_mqtt_json_message_and_default_current_sta
|
||||
assert state.attributes.get("val") == "valcontent"
|
||||
assert state.attributes.get("par") == "parcontent"
|
||||
|
||||
await hass.async_block_till_done(wait_background_tasks=True)
|
||||
|
||||
|
||||
@pytest.mark.parametrize("hass_config", [DEFAULT_CONFIG])
|
||||
async def test_availability_when_connection_lost(
|
||||
|
@ -335,7 +335,7 @@ async def test_default_entity_and_device_name(
|
||||
|
||||
# Assert that no issues ware registered
|
||||
assert len(events) == 0
|
||||
await hass.async_block_till_done()
|
||||
await hass.async_block_till_done(wait_background_tasks=True)
|
||||
# Assert that no issues ware registered
|
||||
assert len(events) == 0
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user