diff --git a/avatar/cases/host_test.py b/avatar/cases/host_test.py index feaeaa5..d53705f 100644 --- a/avatar/cases/host_test.py +++ b/avatar/cases/host_test.py @@ -59,7 +59,10 @@ def teardown_class(self) -> None: @avatar.asynchronous async def setup_test(self) -> None: # pytype: disable=wrong-arg-types - await asyncio.gather(self.dut.reset(), self.ref.reset()) + # NOTE: this used to be performed in parallel but can lead to flakiness + # (eg. the DUT has re-connect logics and REF reset too fast). + await self.dut.reset() + await self.ref.reset() @avatar.parameterized( (DISCOVERABLE_LIMITED,), diff --git a/avatar/cases/le_host_test.py b/avatar/cases/le_host_test.py index 8af96fa..f13bed5 100644 --- a/avatar/cases/le_host_test.py +++ b/avatar/cases/le_host_test.py @@ -74,7 +74,10 @@ def teardown_class(self) -> None: @avatar.asynchronous async def setup_test(self) -> None: # pytype: disable=wrong-arg-types - await asyncio.gather(self.dut.reset(), self.ref.reset()) + # NOTE: this used to be performed in parallel but can lead to flakiness + # (eg. the DUT has re-connect logics and REF reset too fast). + await self.dut.reset() + await self.ref.reset() @avatar.parameterized( *itertools.product( diff --git a/avatar/cases/le_security_test.py b/avatar/cases/le_security_test.py index d8495e9..3f4bee3 100644 --- a/avatar/cases/le_security_test.py +++ b/avatar/cases/le_security_test.py @@ -152,7 +152,10 @@ async def test_le_pairing( raise signals.TestSkip('CTKD requires Security Level 4') # Factory reset both DUT and REF devices. - await asyncio.gather(self.dut.reset(), self.ref.reset()) + # NOTE: this used to be performed in parallel but can lead to flakiness + # (eg. the DUT has re-connect logics and REF reset too fast). + await self.dut.reset() + await self.ref.reset() # Override REF IO capability if supported. if isinstance(self.ref, BumblePandoraDevice): diff --git a/avatar/cases/security_test.py b/avatar/cases/security_test.py index 5749ed8..8615808 100644 --- a/avatar/cases/security_test.py +++ b/avatar/cases/security_test.py @@ -200,7 +200,10 @@ async def test_ssp( raise signals.TestSkip('CTKD cases must be conducted under Security Level 4') # Factory reset both DUT and REF devices. - await asyncio.gather(self.dut.reset(), self.ref.reset()) + # NOTE: this used to be performed in parallel but can lead to flakiness + # (eg. the DUT has re-connect logics and REF reset too fast). + await self.dut.reset() + await self.ref.reset() # Override REF IO capability if supported. if isinstance(self.ref, BumblePandoraDevice):