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

Skip to content
Commit 284ed118 authored by Michal Belusiak's avatar Michal Belusiak
Browse files

HapClientTest: Fix flaky test caused by onReceive call after tearDown

Even if mHasIntentReceiver is unregistered in tearDown it can be called,
which cause fatal exception as other variables was cleared.

Add wait for onReceive callback in test cases.

These two tests are fix with that:
testDumpDoesNotCrash, testOutgoingConnectExistingHasUuid

Test testStackEventOnPresetNameSetError was false negativ because test
testOutgoingConnectExistingHasUuid which was previous of this one trigger
late call of onReceive during this test.

Bug: 320205015
Test: atest com.android.bluetooth.hap.HapClientTest#testDumpDoesNotCrash,testOutgoingConnectExistingHasUuid --rerun-until-failure
Flag: Exempt, unit test flaky fix

Change-Id: I843a07cf7a54a76da8b2dd8cae70787db425d382
parent 55f333c4
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