Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1114)

Unified Diff: webrtc/media/engine/apm_helpers_unittest.cc

Issue 2729133002: Make sure that ApmHelpersTest tests don't enter a tight loop. (Closed)
Patch Set: Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/media/engine/apm_helpers_unittest.cc
diff --git a/webrtc/media/engine/apm_helpers_unittest.cc b/webrtc/media/engine/apm_helpers_unittest.cc
index 80b03ad0e1c02e965e50491dd0a9155f78d55cbc..8c28db703c01fbb5e6c5d2e64ddea914945f2290 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<ExperimentalAgc>(new ExperimentalAgc(false));
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698