Fix flaky tests related to bluetooth browser media service.
Problem: Some of the test randomly fails while trying to assert the value of BluetoothMediaBrowserService's session state. Solution: Test's setup should wait until BluetoothBrowserMediaService is up and running. Using ServiceTestRule makes the starService call a blocking call. Once the service is up, rest of the test case proceeds with the test logic. Bug: 275458774 Test: Ran a custom script which runs each test 20 times to ensure it doesn't fail. Test: atest GoogleBluetoothInstrumentationTests:com.android.bluetooth .a2dpsink.A2dpSinkStreamHandlerTest Test: atest GoogleBluetoothInstrumentationTests:com.android.bluetooth .avrcpcontroller.AvrcpBipClientTest Test: atest GoogleBluetoothInstrumentationTests:com.android.bluetooth .a2dpsink.A2dpSinkStreamHandlerTest Tag: #stability Change-Id: I7c8fc877e50f4b0e40f6c4463b05e9292d3fa656
Loading
Please register or sign in to comment