Revert 5711 "Fixing a flaky test in video_engine_tests"
> Fixing a flaky test in video_engine_tests > > VideoSendStreamTest.SuspendBelowMinBitrate was flaky. The problem was that when the first non-padding packet was sent after the stream was resumed, the statistics had not always been updated so that stats.suspended was false. After seeing the first non-padding packet after suspension, the test will now go into a state where it waits for the statistics to be changed. > > BUG=3068 > R=pbos@webrtc.org > TBR=stefan@webrtc.org > > Review URL: https://webrtc-codereview.appspot.com/10069004 TBR=henrik.lundin@webrtc.org Review URL: https://webrtc-codereview.appspot.com/10089005 git-svn-id: http://webrtc.googlecode.com/svn/trunk@5712 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
parent
d0f0c76cd9
commit
12499ff20b
@ -870,8 +870,7 @@ TEST_F(VideoSendStreamTest, CanChangeSendCodec) {
|
|||||||
// 3. Wait until |kSuspendTimeFrames| have been captured without seeing any RTP
|
// 3. Wait until |kSuspendTimeFrames| have been captured without seeing any RTP
|
||||||
// packets.
|
// packets.
|
||||||
// 4. Signal a high REMB and then wait for the RTP stream to start again.
|
// 4. Signal a high REMB and then wait for the RTP stream to start again.
|
||||||
// When the stream is detected again, and the stats show that the stream
|
// When the stream is detected again, the test ends.
|
||||||
// is no longer suspended, the test ends.
|
|
||||||
TEST_F(VideoSendStreamTest, SuspendBelowMinBitrate) {
|
TEST_F(VideoSendStreamTest, SuspendBelowMinBitrate) {
|
||||||
static const int kSuspendTimeFrames = 60; // Suspend for 2 seconds @ 30 fps.
|
static const int kSuspendTimeFrames = 60; // Suspend for 2 seconds @ 30 fps.
|
||||||
|
|
||||||
@ -923,15 +922,10 @@ TEST_F(VideoSendStreamTest, SuspendBelowMinBitrate) {
|
|||||||
}
|
}
|
||||||
} else if (test_state_ == kWaitingForPacket) {
|
} else if (test_state_ == kWaitingForPacket) {
|
||||||
if (header.paddingLength == 0) {
|
if (header.paddingLength == 0) {
|
||||||
// Non-padding packet observed. Test is almost complete. Will just
|
// Non-padding packet observed. Test is complete.
|
||||||
// have to wait for the stats to change.
|
assert(*send_stream_ptr_);
|
||||||
test_state_ = kWaitingForStats;
|
VideoSendStream::Stats stats = (*send_stream_ptr_)->GetStats();
|
||||||
}
|
EXPECT_FALSE(stats.suspended);
|
||||||
} else if (test_state_ == kWaitingForStats) {
|
|
||||||
assert(*send_stream_ptr_);
|
|
||||||
VideoSendStream::Stats stats = (*send_stream_ptr_)->GetStats();
|
|
||||||
if (stats.suspended == false) {
|
|
||||||
// Stats flipped to false. Test is complete.
|
|
||||||
observation_complete_->Set();
|
observation_complete_->Set();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -963,7 +957,7 @@ TEST_F(VideoSendStreamTest, SuspendBelowMinBitrate) {
|
|||||||
kBeforeSuspend,
|
kBeforeSuspend,
|
||||||
kDuringSuspend,
|
kDuringSuspend,
|
||||||
kWaitingForPacket,
|
kWaitingForPacket,
|
||||||
kWaitingForStats
|
kAfterSuspend
|
||||||
};
|
};
|
||||||
|
|
||||||
virtual void SendRtcpFeedback(int remb_value) {
|
virtual void SendRtcpFeedback(int remb_value) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user