diff --git a/webrtc/media/engine/apm_helpers_unittest.cc b/webrtc/media/engine/apm_helpers_unittest.cc index 80b03ad0e1..8c28db703c 100644 --- a/webrtc/media/engine/apm_helpers_unittest.cc +++ b/webrtc/media/engine/apm_helpers_unittest.cc @@ -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(new ExperimentalAgc(false));