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

Unified Diff: webrtc/pc/channel_unittest.cc

Issue 2539183005: Relaxing timeouts for TestMediaMonitor. (Closed)
Patch Set: Created 4 years 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/pc/channel_unittest.cc
diff --git a/webrtc/pc/channel_unittest.cc b/webrtc/pc/channel_unittest.cc
index 16b5be71e1fc3e9c6574e8471023b4963af673c1..52bf8f53dce0b05a5fa10bf78835bb9a7ef64402 100644
--- a/webrtc/pc/channel_unittest.cc
+++ b/webrtc/pc/channel_unittest.cc
@@ -50,6 +50,7 @@ const uint32_t kSsrc3 = 0x3333;
const int kAudioPts[] = {0, 8};
const int kVideoPts[] = {97, 99};
enum class NetworkIsWorker { Yes, No };
+const int kDefaultTimeout = 10000; // 10 seconds.
} // namespace
template <class ChannelT,
@@ -1595,22 +1596,21 @@ class ChannelTest : public testing::Test, public sigslot::has_slots<> {
EXPECT_TRUE(CheckCustomRtcp2(kSsrc2));
}
- // Test that the media monitor can be run and gives timely callbacks.
+ // Test that the media monitor can be run and gives callbacks.
void TestMediaMonitor() {
- static const int kTimeout = 500;
CreateChannels(0, 0);
EXPECT_TRUE(SendInitiate());
EXPECT_TRUE(SendAccept());
channel1_->StartMediaMonitor(100);
channel2_->StartMediaMonitor(100);
// Ensure we get callbacks and stop.
- EXPECT_TRUE_WAIT(media_info_callbacks1_ > 0, kTimeout);
- EXPECT_TRUE_WAIT(media_info_callbacks2_ > 0, kTimeout);
+ EXPECT_TRUE_WAIT(media_info_callbacks1_ > 0, kDefaultTimeout);
+ EXPECT_TRUE_WAIT(media_info_callbacks2_ > 0, kDefaultTimeout);
channel1_->StopMediaMonitor();
channel2_->StopMediaMonitor();
// Ensure a restart of a stopped monitor works.
channel1_->StartMediaMonitor(100);
- EXPECT_TRUE_WAIT(media_info_callbacks1_ > 0, kTimeout);
+ EXPECT_TRUE_WAIT(media_info_callbacks1_ > 0, kDefaultTimeout);
channel1_->StopMediaMonitor();
// Ensure stopping a stopped monitor is OK.
channel1_->StopMediaMonitor();
« 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