Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 8b8ed167 authored by Gopi Sakshihally Bhuthaiah's avatar Gopi Sakshihally Bhuthaiah
Browse files

HidHostTest: Use Mockito to wait for events instead of Future

* This helps get rid of unncessary broadcast receiver and listener
  classes
* Before this change, there is no gurantee that A2DP, HFP, and HID_HOST
  service proxy will be connected on time during setUp() function. This
  change ensures that we always wait for service proxy connections
* Before this change, some times the Future is created after calling the
  method under test, if the future is completed before the Future is
  completed, then we will wait forever for the future. This change makes
  sure this race condition won't happen

* Added EnableBluetoothRule to toggle Bluetooth at each test, adding
  about 2 second delay to each test, but it makes the test much more
  stable

Test: atest HidHostTest
Flag: TEST_ONLY
Bug: 363974008
Change-Id: I9e9a198bdccd1510f963a8bb85df78b5d52f54e7
parent 50d8fce7
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment