Audio VTS: Workaround async HIDL destructor by sleeping
authorKevin Rocard <krocard@google.com>
Wed, 29 Aug 2018 23:22:52 +0000 (16:22 -0700)
committerKevin Rocard <krocard@google.com>
Wed, 19 Sep 2018 18:27:15 +0000 (18:27 +0000)
commitd87a288e82120208af566677ef4c30fe1382df39
treeb4ad906e03c786f56acf97464ae0c18616c4d36b
parent2070f8b0b8982f0521efb1798fce2cc56631e26e
Audio VTS: Workaround async HIDL destructor by sleeping

The test creates an instance of the Audio HAL then destroys it and create it again.
The test assumed that the destruction was synchronous when in fact it is async with
no way of knowing when the object has been destroyed.

As a result, until a better solution is found, sleep for 100ms to hopefully let enouth
time for the HAL destructor to return.

Bug: 112566489
Test: adb shell /data/nativetest64/VtsHalAudioV4_0TargetTest/VtsHalAudioV4_0TargetTest --gtest_filter=*OpenPrimaryDeviceUsingGetDevice
      atest VtsHalAudioV4_0TargetTest
Change-Id: I0ec75c12007d39060232632708722df5bf0f99d7
Signed-off-by: Kevin Rocard <krocard@google.com>
audio/core/4.0/vts/functional/AudioPrimaryHidlHalTest.cpp