Fix flakiness in network up/down event tests when running under memcheck.
TBR=pwestin@webrtc.org BUG=1524 Review URL: https://webrtc-codereview.appspot.com/1261005 git-svn-id: http://webrtc.googlecode.com/svn/trunk@3732 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
parent
add50b94a5
commit
e1a7193869
webrtc
@ -603,7 +603,6 @@ void RTPSender::TimeToSendPacket(uint16_t sequence_number,
|
|||||||
}
|
}
|
||||||
if (!packet_history_->GetRTPPacket(sequence_number, 0, data_buffer, &length,
|
if (!packet_history_->GetRTPPacket(sequence_number, 0, data_buffer, &length,
|
||||||
&stored_time_ms, &type)) {
|
&stored_time_ms, &type)) {
|
||||||
assert(false);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
assert(length > 0);
|
assert(length > 0);
|
||||||
|
@ -380,7 +380,9 @@ void ViEAutoTest::ViERtpRtcpStandardTest()
|
|||||||
EXPECT_EQ(0, ViE.rtp_rtcp->GetBandwidthUsage(
|
EXPECT_EQ(0, ViE.rtp_rtcp->GetBandwidthUsage(
|
||||||
tbChannel.videoChannel, sentTotalBitrate, sentVideoBitrate,
|
tbChannel.videoChannel, sentTotalBitrate, sentVideoBitrate,
|
||||||
sentFecBitrate, sentNackBitrate));
|
sentFecBitrate, sentNackBitrate));
|
||||||
EXPECT_GT(sentTotalBitrate, 0u);
|
if (FLAGS_include_timing_dependent_tests) {
|
||||||
|
EXPECT_GT(sentTotalBitrate, 0u);
|
||||||
|
}
|
||||||
// Simulate lost reception and verify that nothing is sent during that time.
|
// Simulate lost reception and verify that nothing is sent during that time.
|
||||||
ViE.network->SetNetworkTransmissionState(tbChannel.videoChannel, false);
|
ViE.network->SetNetworkTransmissionState(tbChannel.videoChannel, false);
|
||||||
ViETest::Log("Network Down...\n");
|
ViETest::Log("Network Down...\n");
|
||||||
@ -388,7 +390,9 @@ void ViEAutoTest::ViERtpRtcpStandardTest()
|
|||||||
EXPECT_EQ(0, ViE.rtp_rtcp->GetBandwidthUsage(
|
EXPECT_EQ(0, ViE.rtp_rtcp->GetBandwidthUsage(
|
||||||
tbChannel.videoChannel, sentTotalBitrate, sentVideoBitrate,
|
tbChannel.videoChannel, sentTotalBitrate, sentVideoBitrate,
|
||||||
sentFecBitrate, sentNackBitrate));
|
sentFecBitrate, sentNackBitrate));
|
||||||
EXPECT_EQ(sentTotalBitrate, 0u);
|
if (FLAGS_include_timing_dependent_tests) {
|
||||||
|
EXPECT_EQ(sentTotalBitrate, 0u);
|
||||||
|
}
|
||||||
|
|
||||||
// Network reception back. Video should now be sent.
|
// Network reception back. Video should now be sent.
|
||||||
ViE.network->SetNetworkTransmissionState(tbChannel.videoChannel, true);
|
ViE.network->SetNetworkTransmissionState(tbChannel.videoChannel, true);
|
||||||
@ -397,7 +401,9 @@ void ViEAutoTest::ViERtpRtcpStandardTest()
|
|||||||
EXPECT_EQ(0, ViE.rtp_rtcp->GetBandwidthUsage(
|
EXPECT_EQ(0, ViE.rtp_rtcp->GetBandwidthUsage(
|
||||||
tbChannel.videoChannel, sentTotalBitrate, sentVideoBitrate,
|
tbChannel.videoChannel, sentTotalBitrate, sentVideoBitrate,
|
||||||
sentFecBitrate, sentNackBitrate));
|
sentFecBitrate, sentNackBitrate));
|
||||||
EXPECT_GT(sentTotalBitrate, 0u);
|
if (FLAGS_include_timing_dependent_tests) {
|
||||||
|
EXPECT_GT(sentTotalBitrate, 0u);
|
||||||
|
}
|
||||||
|
|
||||||
// Buffering mode.
|
// Buffering mode.
|
||||||
EXPECT_EQ(0, ViE.base->StopSend(tbChannel.videoChannel));
|
EXPECT_EQ(0, ViE.base->StopSend(tbChannel.videoChannel));
|
||||||
@ -415,7 +421,9 @@ void ViEAutoTest::ViERtpRtcpStandardTest()
|
|||||||
EXPECT_EQ(0, ViE.rtp_rtcp->GetBandwidthUsage(
|
EXPECT_EQ(0, ViE.rtp_rtcp->GetBandwidthUsage(
|
||||||
tbChannel.videoChannel, sentTotalBitrate, sentVideoBitrate,
|
tbChannel.videoChannel, sentTotalBitrate, sentVideoBitrate,
|
||||||
sentFecBitrate, sentNackBitrate));
|
sentFecBitrate, sentNackBitrate));
|
||||||
EXPECT_GT(sentTotalBitrate, 0u);
|
if (FLAGS_include_timing_dependent_tests) {
|
||||||
|
EXPECT_GT(sentTotalBitrate, 0u);
|
||||||
|
}
|
||||||
// Simulate lost reception and verify that nothing is sent during that time.
|
// Simulate lost reception and verify that nothing is sent during that time.
|
||||||
ViETest::Log("Network Down...\n");
|
ViETest::Log("Network Down...\n");
|
||||||
ViE.network->SetNetworkTransmissionState(tbChannel.videoChannel, false);
|
ViE.network->SetNetworkTransmissionState(tbChannel.videoChannel, false);
|
||||||
@ -423,7 +431,9 @@ void ViEAutoTest::ViERtpRtcpStandardTest()
|
|||||||
EXPECT_EQ(0, ViE.rtp_rtcp->GetBandwidthUsage(
|
EXPECT_EQ(0, ViE.rtp_rtcp->GetBandwidthUsage(
|
||||||
tbChannel.videoChannel, sentTotalBitrate, sentVideoBitrate,
|
tbChannel.videoChannel, sentTotalBitrate, sentVideoBitrate,
|
||||||
sentFecBitrate, sentNackBitrate));
|
sentFecBitrate, sentNackBitrate));
|
||||||
EXPECT_EQ(sentTotalBitrate, 0u);
|
if (FLAGS_include_timing_dependent_tests) {
|
||||||
|
EXPECT_EQ(sentTotalBitrate, 0u);
|
||||||
|
}
|
||||||
// Network reception back. Video should now be sent.
|
// Network reception back. Video should now be sent.
|
||||||
ViETest::Log("Network Up...\n");
|
ViETest::Log("Network Up...\n");
|
||||||
ViE.network->SetNetworkTransmissionState(tbChannel.videoChannel, true);
|
ViE.network->SetNetworkTransmissionState(tbChannel.videoChannel, true);
|
||||||
@ -431,7 +441,9 @@ void ViEAutoTest::ViERtpRtcpStandardTest()
|
|||||||
EXPECT_EQ(0, ViE.rtp_rtcp->GetBandwidthUsage(
|
EXPECT_EQ(0, ViE.rtp_rtcp->GetBandwidthUsage(
|
||||||
tbChannel.videoChannel, sentTotalBitrate, sentVideoBitrate,
|
tbChannel.videoChannel, sentTotalBitrate, sentVideoBitrate,
|
||||||
sentFecBitrate, sentNackBitrate));
|
sentFecBitrate, sentNackBitrate));
|
||||||
EXPECT_GT(sentTotalBitrate, 0u);
|
if (FLAGS_include_timing_dependent_tests) {
|
||||||
|
EXPECT_GT(sentTotalBitrate, 0u);
|
||||||
|
}
|
||||||
// TODO(holmer): Verify that the decoded framerate doesn't decrease on an
|
// TODO(holmer): Verify that the decoded framerate doesn't decrease on an
|
||||||
// outage when in buffering mode. This isn't currently possible because we
|
// outage when in buffering mode. This isn't currently possible because we
|
||||||
// don't have an API to get decoded framerate.
|
// don't have an API to get decoded framerate.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user