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

Unified Diff: webrtc/video/video_send_stream_tests.cc

Issue 2307693002: Fixed flaky VideoSendStreamTest::SupportsAbsoluteSendTime (Closed)
Patch Set: formatting Created 4 years, 3 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/video_send_stream_tests.cc
diff --git a/webrtc/video/video_send_stream_tests.cc b/webrtc/video/video_send_stream_tests.cc
index 623cd34ac5e8860f7b9e6666172f5a082134ffa7..a5b42f0e2d3befa79ce052f4c1da7c711832513d 100644
--- a/webrtc/video/video_send_stream_tests.cc
+++ b/webrtc/video/video_send_stream_tests.cc
@@ -136,8 +136,16 @@ TEST_F(VideoSendStreamTest, SupportsAbsoluteSendTime) {
EXPECT_FALSE(header.extension.hasTransmissionTimeOffset);
EXPECT_TRUE(header.extension.hasAbsoluteSendTime);
EXPECT_EQ(header.extension.transmissionTimeOffset, 0);
- EXPECT_GT(header.extension.absoluteSendTime, 0u);
- observation_complete_.Set();
+ if (header.extension.absoluteSendTime != 0) {
+ // Wait for at least one packet with a non-zero send time. The send time
+ // is a 16-bit value derived from the system clock, and it is valid
+ // for a packet to have a zero send time. To tell that from an
+ // unpopulated value we'll wait for a packet with non-zero send time.
+ observation_complete_.Set();
+ } else {
+ LOG(LS_WARNING) << "Got a packet with zero absoluteSendTime, waiting"
+ " for another packet...";
+ }
return SEND_PACKET;
}
« 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