Make sure that ApmHelpersTest tests don't enter a tight loop.

BUG=webrtc:7219, webrtc:7290
TBR=solenberg@webrtc.org

Review-Url: https://codereview.webrtc.org/2729133002
Cr-Commit-Position: refs/heads/master@{#16996}
This commit is contained in:
tommi 2017-03-03 01:34:15 -08:00 committed by Commit bot
parent 2fc52544b0
commit f0d7b2b507

View File

@ -25,6 +25,11 @@ constexpr AgcConfig kDefaultAgcConfig = { 3, 9, true };
struct TestHelper {
TestHelper() {
// Reply with a 10ms timer every time TimeUntilNextProcess is called to
// avoid entering a tight loop on the process thread.
EXPECT_CALL(mock_audio_device_, TimeUntilNextProcess())
.WillRepeatedly(testing::Return(10));
// This replicates the conditions from voe_auto_test.
Config config;
config.Set<ExperimentalAgc>(new ExperimentalAgc(false));