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

Skip to content
Commit dd8a4734 authored by Jack He's avatar Jack He
Browse files

Test: Fix broken tests in RemoteDevicesTest

* Refactor RemoteDevices.java to apply dependency injection design
  pattern: User an explicity looper passed through the class constructor
  so that a user of the class can choose which thread it runs on
* By default, it runs on the main service thread in AdapterService.java
* During test, it runs on a HanlderThread created during the test
* A TestLooperManager is used to mannually intercept and execute
  messages on the handler to guarantee timing consistency

Bug: 67942165
Test: runtest -i -j40 bluetooth; adb shell am instrument -w -e timeout_msec 300000
     'com.android.bluetooth.tests/android.support.test.runner.AndroidJUnitRunne

Change-Id: Ieab21b428e74eb84766a7be835d1bf07471743bc
parent 9ca34c11
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