Fix flaky test test_async_parallel_updates_with_zero_on_sync_update (#143810)

This commit is contained in:
Erik Montnemery 2025-04-28 09:27:26 +02:00 committed by GitHub
parent 5392062edd
commit d860b35f41
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -13,6 +13,7 @@ from unittest.mock import MagicMock, PropertyMock, patch
from freezegun.api import FrozenDateTimeFactory
from propcache.api import cached_property
import pytest
from pytest_unordered import unordered
from syrupy.assertion import SnapshotAssertion
import voluptuous as vol
@ -393,7 +394,7 @@ async def test_async_parallel_updates_with_zero_on_sync_update(
await asyncio.sleep(0)
assert len(updates) == 2
assert updates == [1, 2]
assert updates == unordered([1, 2])
finally:
test_lock.set()
await asyncio.sleep(0)