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

Unified Diff: webrtc/video/end_to_end_tests.cc

Issue 2728103002: Fix flaky EndToEndTest.TransportSeqNumOnAudioAndVideo (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/video/end_to_end_tests.cc
diff --git a/webrtc/video/end_to_end_tests.cc b/webrtc/video/end_to_end_tests.cc
index cb7edd422fa619bc9e36e1928950415b3b3208d2..3fb8f13d23e1500ca2e1992da184bcd0a9f6a2c2 100644
--- a/webrtc/video/end_to_end_tests.cc
+++ b/webrtc/video/end_to_end_tests.cc
@@ -4063,7 +4063,7 @@ TEST_P(EndToEndTest, TransportSeqNumOnAudioAndVideo) {
if (header.ssrc == kAudioSendSsrc)
audio_observed_ = true;
if (audio_observed_ && video_observed_ &&
- received_packet_ids_.size() == 50) {
+ received_packet_ids_.size() >= 50) {
åsapersson 2017/03/03 11:16:19 maybe add a constant for 50
danilchap 2017/03/03 12:14:11 Done.
size_t packet_id_range =
*received_packet_ids_.rbegin() - *received_packet_ids_.begin() + 1;
EXPECT_EQ(received_packet_ids_.size(), packet_id_range);
@@ -4075,6 +4075,11 @@ TEST_P(EndToEndTest, TransportSeqNumOnAudioAndVideo) {
void PerformTest() override {
EXPECT_TRUE(Wait()) << "Timed out while waiting for audio and video "
"packets with transport sequence number.";
+ // Double check conditions for successfull test to produce better error
+ // message when this test fail.
+ EXPECT_TRUE(video_observed_);
+ EXPECT_TRUE(audio_observed_);
+ EXPECT_GE(received_packet_ids_.size(), 50u);
}
private:
« 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