Reduce flakiness in network down test.
The encoder is in the process of encoding when the network goes down, so we need to wait until it has finished before we expect no more packets to be sent. Also fixed a test which was testing the wrong thing. R=mflodman@webrtc.org Review URL: https://webrtc-codereview.appspot.com/2258008 git-svn-id: http://webrtc.googlecode.com/svn/trunk@4808 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
parent
63fe8e1f38
commit
269dd4264f
@ -514,6 +514,9 @@ void ViEAutoTest::ViERtpRtcpStandardTest()
|
||||
}
|
||||
// Simulate lost reception and verify that nothing is sent during that time.
|
||||
ViE.network->SetNetworkTransmissionState(tbChannel.videoChannel, false);
|
||||
// Allow the encoder to finish the current frame before we expect that no
|
||||
// additional packets will be sent.
|
||||
AutoTestSleep(kAutoTestSleepTimeMs);
|
||||
bytes_received_before = bytes_received_after;
|
||||
ViETest::Log("Network Down...\n");
|
||||
AutoTestSleep(kAutoTestSleepTimeMs);
|
||||
@ -555,13 +558,18 @@ void ViEAutoTest::ViERtpRtcpStandardTest()
|
||||
// Simulate lost reception and verify that nothing is sent during that time.
|
||||
ViETest::Log("Network Down...\n");
|
||||
ViE.network->SetNetworkTransmissionState(tbChannel.videoChannel, false);
|
||||
// Allow the encoder to finish the current frame before we expect that no
|
||||
// additional packets will be sent.
|
||||
AutoTestSleep(kAutoTestSleepTimeMs);
|
||||
bytes_received_after = bytes_received_before;
|
||||
AutoTestSleep(kAutoTestSleepTimeMs);
|
||||
EXPECT_EQ(0, ViE.rtp_rtcp->GetRTPStatistics(tbChannel.videoChannel,
|
||||
bytes_sent_before,
|
||||
packets_sent_before,
|
||||
bytes_received_before,
|
||||
packets_received_before));
|
||||
if (FLAGS_include_timing_dependent_tests) {
|
||||
EXPECT_GT(bytes_received_before, bytes_received_after);
|
||||
EXPECT_EQ(bytes_received_before, bytes_received_after);
|
||||
}
|
||||
AutoTestSleep(kAutoTestSleepTimeMs);
|
||||
EXPECT_EQ(0, ViE.rtp_rtcp->GetRTPStatistics(tbChannel.videoChannel,
|
||||
|
Loading…
x
Reference in New Issue
Block a user