mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 11:17:21 +00:00
Fix flaky test test_async_parallel_updates_with_zero_on_sync_update (#143810)
This commit is contained in:
parent
5392062edd
commit
d860b35f41
@ -13,6 +13,7 @@ from unittest.mock import MagicMock, PropertyMock, patch
|
|||||||
from freezegun.api import FrozenDateTimeFactory
|
from freezegun.api import FrozenDateTimeFactory
|
||||||
from propcache.api import cached_property
|
from propcache.api import cached_property
|
||||||
import pytest
|
import pytest
|
||||||
|
from pytest_unordered import unordered
|
||||||
from syrupy.assertion import SnapshotAssertion
|
from syrupy.assertion import SnapshotAssertion
|
||||||
import voluptuous as vol
|
import voluptuous as vol
|
||||||
|
|
||||||
@ -393,7 +394,7 @@ async def test_async_parallel_updates_with_zero_on_sync_update(
|
|||||||
await asyncio.sleep(0)
|
await asyncio.sleep(0)
|
||||||
|
|
||||||
assert len(updates) == 2
|
assert len(updates) == 2
|
||||||
assert updates == [1, 2]
|
assert updates == unordered([1, 2])
|
||||||
finally:
|
finally:
|
||||||
test_lock.set()
|
test_lock.set()
|
||||||
await asyncio.sleep(0)
|
await asyncio.sleep(0)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user