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

Skip to content
Commit 77e3ec27 authored by Jakub Tyszkowski's avatar Jakub Tyszkowski
Browse files

le_audio: Fix flaky audio hal client test

Sometimes the test takes a bit longer than usually and the periodic
audio data reading function runs twice. This fixes the following error
caused by improper mocking of periodically called function:

GMOCK WARNING:
packages/modules/Bluetooth/system/bta/le_audio/audio_hal_client/audio_hal_client_test.cc:465:
Actions ran out in EXPECT_CALL(mock_hal_interface_audio_sink_, Read(_,
_))...
Called 2 times, but only 1 WillOnce() is specified - returning default
value.
Stack trace:
packages/modules/Bluetooth/system/bta/le_audio/audio_hal_client/audio_hal_client_test.cc:486:
Failure
Mock function called more times than expected - returning directly.
    Function call: OnAudioDataReady(@0x7ba4429c66a0 { '\0', '\0', '\0',
    '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0',
    '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0',
    '\0', '\0', '\0', '\0', '\0', '\0', '\0', ... })
             Expected: to be called once
	                Actual: called twice - over-saturated and active

Bug: 264033479
Tag: #feature
Test: atest --host LeAudioClientAudioTest#testAudioHalClientResumeStartSourceTask --no-bazel-mode --rerun-until-failure 10000
Change-Id: If489eebeb4a5f97c86715aa068508dd32e05c266
parent e367ad0d
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