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

Unified Diff: webrtc/call/rampup_tests.cc

Issue 2599013002: Clean up ramp-up tests and make sure they all pass. (Closed)
Patch Set: Created 4 years 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
« webrtc/call/rampup_tests.h ('K') | « webrtc/call/rampup_tests.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/call/rampup_tests.cc
diff --git a/webrtc/call/rampup_tests.cc b/webrtc/call/rampup_tests.cc
index eec3258773e75f927642c85846b883cbe75ed0a5..2f80dd534e389e5b8c73015d796a37fbaee605a8 100644
--- a/webrtc/call/rampup_tests.cc
+++ b/webrtc/call/rampup_tests.cc
@@ -367,7 +367,7 @@ RampUpDownUpTester::RampUpDownUpTester(size_t num_video_streams,
state_start_ms_(clock_->TimeInMilliseconds()),
interval_start_ms_(clock_->TimeInMilliseconds()),
sent_bytes_(0) {
- forward_transport_config_.link_capacity_kbps = kHighBandwidthLimitBps / 1000;
+ forward_transport_config_.link_capacity_kbps = GetHighCapacity();
}
RampUpDownUpTester::~RampUpDownUpTester() {}
@@ -420,9 +420,16 @@ std::string RampUpDownUpTester::GetModifierString() const {
}
int RampUpDownUpTester::GetExpectedHighBitrate() const {
- if (num_audio_streams_ > 0 && num_video_streams_ == 0)
- return kExpectedHighAudioBitrateBps;
- return kExpectedHighVideoBitrateBps;
+ int expected_bitrate_bps = 0;
+ if (num_audio_streams_ > 0)
+ expected_bitrate_bps += kExpectedHighAudioBitrateBps;
+ if (num_video_streams_ > 0)
+ expected_bitrate_bps += kExpectedHighVideoBitrateBps;
+ return expected_bitrate_bps;
+}
+
+int RampUpDownUpTester::GetHighCapacity() const {
+ return 4 * GetExpectedHighBitrate() / (3 * 1000);
}
void RampUpDownUpTester::EvolveTestState(int bitrate_bps, bool suspended) {
@@ -453,8 +460,7 @@ void RampUpDownUpTester::EvolveTestState(int bitrate_bps, bool suspended) {
suspended == check_suspend_state) {
// The ramp-down was successful. Change the channel limit back to a
// high value, and move to the next test state.
- forward_transport_config_.link_capacity_kbps =
- kHighBandwidthLimitBps / 1000;
+ forward_transport_config_.link_capacity_kbps = GetHighCapacity();
send_transport_->SetConfig(forward_transport_config_);
test_state_ = kSecondRampup;
webrtc::test::PrintResult("ramp_up_down_up", GetModifierString(),
@@ -490,123 +496,51 @@ class RampUpTest : public test::CallTest {
}
};
-TEST_F(RampUpTest, SingleStream) {
- RampUpTester test(1, 0, 0, RtpExtension::kTimestampOffsetUri, false, false);
- RunBaseTest(&test);
-}
-
-TEST_F(RampUpTest, Simulcast) {
- RampUpTester test(3, 0, 0, RtpExtension::kTimestampOffsetUri, false, false);
- RunBaseTest(&test);
-}
-
-TEST_F(RampUpTest, SimulcastWithRtx) {
- RampUpTester test(3, 0, 0, RtpExtension::kTimestampOffsetUri, true, false);
- RunBaseTest(&test);
-}
-
-TEST_F(RampUpTest, SimulcastByRedWithRtx) {
- RampUpTester test(3, 0, 0, RtpExtension::kTimestampOffsetUri, true, true);
- RunBaseTest(&test);
-}
-
-TEST_F(RampUpTest, SingleStreamWithHighStartBitrate) {
- RampUpTester test(1, 0, 0.9 * kSingleStreamTargetBps,
- RtpExtension::kTimestampOffsetUri, false, false);
- RunBaseTest(&test);
-}
-
static const uint32_t kStartBitrateBps = 60000;
-// Disabled: https://bugs.chromium.org/p/webrtc/issues/detail?id=5576
-TEST_F(RampUpTest, DISABLED_UpDownUpOneStream) {
- RampUpDownUpTester test(1, 0, kStartBitrateBps, RtpExtension::kAbsSendTimeUri,
- false, false);
- RunBaseTest(&test);
-}
-
-TEST_F(RampUpTest, DISABLED_UpDownUpThreeStreams) {
- RampUpDownUpTester test(3, 0, kStartBitrateBps, RtpExtension::kAbsSendTimeUri,
- false, false);
- RunBaseTest(&test);
-}
-
-// Disabled: https://bugs.chromium.org/p/webrtc/issues/detail?id=5576
-TEST_F(RampUpTest, DISABLED_UpDownUpOneStreamRtx) {
- RampUpDownUpTester test(1, 0, kStartBitrateBps, RtpExtension::kAbsSendTimeUri,
- true, false);
- RunBaseTest(&test);
-}
-
-TEST_F(RampUpTest, UpDownUpThreeStreamsRtx) {
- RampUpDownUpTester test(3, 0, kStartBitrateBps, RtpExtension::kAbsSendTimeUri,
- true, false);
- RunBaseTest(&test);
-}
-
-// Disabled: https://bugs.chromium.org/p/webrtc/issues/detail?id=5576
-TEST_F(RampUpTest, DISABLED_UpDownUpOneStreamByRedRtx) {
- RampUpDownUpTester test(1, 0, kStartBitrateBps, RtpExtension::kAbsSendTimeUri,
- true, true);
- RunBaseTest(&test);
-}
-
-TEST_F(RampUpTest, UpDownUpThreeStreamsByRedRtx) {
+TEST_F(RampUpTest, UpDownUpAbsSendTimeSimulcastRedRtx) {
RampUpDownUpTester test(3, 0, kStartBitrateBps, RtpExtension::kAbsSendTimeUri,
true, true);
RunBaseTest(&test);
}
-TEST_F(RampUpTest, SendSideVideoUpDownUpRtx) {
+TEST_F(RampUpTest, UpDownUpTransportSequenceNumberRtx) {
RampUpDownUpTester test(3, 0, kStartBitrateBps,
RtpExtension::kTransportSequenceNumberUri, true,
false);
RunBaseTest(&test);
}
-// TODO(holmer): Enable when audio bitrates are included in the bitrate
-// allocation.
-TEST_F(RampUpTest, DISABLED_SendSideAudioVideoUpDownUpRtx) {
+TEST_F(RampUpTest, UpDownUpAudioVideoTransportSequenceNumberRtx) {
RampUpDownUpTester test(3, 1, kStartBitrateBps,
RtpExtension::kTransportSequenceNumberUri, true,
false);
RunBaseTest(&test);
}
-TEST_F(RampUpTest, SendSideAudioOnlyUpDownUpRtx) {
+TEST_F(RampUpTest, UpDownUpAudioTransportSequenceNumberRtx) {
RampUpDownUpTester test(0, 1, kStartBitrateBps,
RtpExtension::kTransportSequenceNumberUri, true,
false);
RunBaseTest(&test);
}
-TEST_F(RampUpTest, AbsSendTimeSingleStream) {
- RampUpTester test(1, 0, 0, RtpExtension::kAbsSendTimeUri, false, false);
- RunBaseTest(&test);
-}
-
-TEST_F(RampUpTest, AbsSendTimeSimulcast) {
- RampUpTester test(3, 0, 0, RtpExtension::kAbsSendTimeUri, false, false);
+TEST_F(RampUpTest, TOffsetSimulcastRedRtx) {
+ RampUpTester test(3, 0, 0, RtpExtension::kTimestampOffsetUri, true, true);
RunBaseTest(&test);
}
-TEST_F(RampUpTest, AbsSendTimeSimulcastWithRtx) {
- RampUpTester test(3, 0, 0, RtpExtension::kAbsSendTimeUri, true, false);
+TEST_F(RampUpTest, AbsSendTime) {
+ RampUpTester test(1, 0, 0, RtpExtension::kAbsSendTimeUri, false, false);
RunBaseTest(&test);
}
-TEST_F(RampUpTest, AbsSendTimeSimulcastByRedWithRtx) {
+TEST_F(RampUpTest, AbsSendTimeSimulcastRedRtx) {
RampUpTester test(3, 0, 0, RtpExtension::kAbsSendTimeUri, true, true);
RunBaseTest(&test);
}
-TEST_F(RampUpTest, AbsSendTimeSingleStreamWithHighStartBitrate) {
- RampUpTester test(1, 0, 0.9 * kSingleStreamTargetBps,
- RtpExtension::kAbsSendTimeUri, false, false);
- RunBaseTest(&test);
-}
-
-TEST_F(RampUpTest, TransportSequenceNumberSingleStream) {
+TEST_F(RampUpTest, TransportSequenceNumber) {
RampUpTester test(1, 0, 0, RtpExtension::kTransportSequenceNumberUri, false,
false);
RunBaseTest(&test);
@@ -618,27 +552,9 @@ TEST_F(RampUpTest, TransportSequenceNumberSimulcast) {
RunBaseTest(&test);
}
-TEST_F(RampUpTest, TransportSequenceNumberSimulcastWithRtx) {
- RampUpTester test(3, 0, 0, RtpExtension::kTransportSequenceNumberUri, true,
- false);
- RunBaseTest(&test);
-}
-
-TEST_F(RampUpTest, AudioVideoTransportSequenceNumberSimulcastWithRtx) {
- RampUpTester test(3, 1, 0, RtpExtension::kTransportSequenceNumberUri, true,
- false);
- RunBaseTest(&test);
-}
-
-TEST_F(RampUpTest, TransportSequenceNumberSimulcastByRedWithRtx) {
+TEST_F(RampUpTest, TransportSequenceNumberSimulcastRedRtx) {
RampUpTester test(3, 0, 0, RtpExtension::kTransportSequenceNumberUri, true,
true);
RunBaseTest(&test);
}
-
-TEST_F(RampUpTest, TransportSequenceNumberSingleStreamWithHighStartBitrate) {
- RampUpTester test(1, 0, 0.9 * kSingleStreamTargetBps,
- RtpExtension::kTransportSequenceNumberUri, false, false);
- RunBaseTest(&test);
-}
} // namespace webrtc
« webrtc/call/rampup_tests.h ('K') | « webrtc/call/rampup_tests.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698