mirror of
https://github.com/home-assistant/core.git
synced 2025-07-15 17:27:10 +00:00
Fix flakiness of test_measure_sliding_window (#115322)
This commit is contained in:
parent
2fdb420d1a
commit
0636ba340c
@ -1175,6 +1175,13 @@ async def test_measure_sliding_window(
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
with (
|
||||||
|
patch(
|
||||||
|
"homeassistant.components.recorder.history.state_changes_during_period",
|
||||||
|
_fake_states,
|
||||||
|
),
|
||||||
|
freeze_time(start_time),
|
||||||
|
):
|
||||||
await async_setup_component(
|
await async_setup_component(
|
||||||
hass,
|
hass,
|
||||||
"sensor",
|
"sensor",
|
||||||
@ -1221,14 +1228,6 @@ async def test_measure_sliding_window(
|
|||||||
},
|
},
|
||||||
)
|
)
|
||||||
await hass.async_block_till_done()
|
await hass.async_block_till_done()
|
||||||
|
|
||||||
with (
|
|
||||||
patch(
|
|
||||||
"homeassistant.components.recorder.history.state_changes_during_period",
|
|
||||||
_fake_states,
|
|
||||||
),
|
|
||||||
freeze_time(start_time),
|
|
||||||
):
|
|
||||||
for i in range(1, 5):
|
for i in range(1, 5):
|
||||||
await async_update_entity(hass, f"sensor.sensor{i}")
|
await async_update_entity(hass, f"sensor.sensor{i}")
|
||||||
await hass.async_block_till_done()
|
await hass.async_block_till_done()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user