aboutsummaryrefslogtreecommitdiff
path: root/modules/congestion_controller/goog_cc/goog_cc_network_control_unittest.cc
diff options
context:
space:
mode:
Diffstat (limited to 'modules/congestion_controller/goog_cc/goog_cc_network_control_unittest.cc')
-rw-r--r--modules/congestion_controller/goog_cc/goog_cc_network_control_unittest.cc63
1 files changed, 38 insertions, 25 deletions
diff --git a/modules/congestion_controller/goog_cc/goog_cc_network_control_unittest.cc b/modules/congestion_controller/goog_cc/goog_cc_network_control_unittest.cc
index 8eb4a00431..7e8d7b9ac6 100644
--- a/modules/congestion_controller/goog_cc/goog_cc_network_control_unittest.cc
+++ b/modules/congestion_controller/goog_cc/goog_cc_network_control_unittest.cc
@@ -124,6 +124,35 @@ void UpdatesTargetRateBasedOnLinkCapacity(std::string test_name = "") {
truth->PrintRow();
EXPECT_NEAR(client->target_rate().kbps(), 90, 25);
}
+
+DataRate RunRembDipScenario(std::string test_name) {
+ Scenario s(test_name);
+ NetworkSimulationConfig net_conf;
+ net_conf.bandwidth = DataRate::KilobitsPerSec(2000);
+ net_conf.delay = TimeDelta::Millis(50);
+ auto* client = s.CreateClient("send", [&](CallClientConfig* c) {
+ c->transport.rates.start_rate = DataRate::KilobitsPerSec(1000);
+ });
+ auto send_net = {s.CreateSimulationNode(net_conf)};
+ auto ret_net = {s.CreateSimulationNode(net_conf)};
+ auto* route = s.CreateRoutes(
+ client, send_net, s.CreateClient("return", CallClientConfig()), ret_net);
+ s.CreateVideoStream(route->forward(), VideoStreamConfig());
+
+ s.RunFor(TimeDelta::Seconds(10));
+ EXPECT_GT(client->send_bandwidth().kbps(), 1500);
+
+ DataRate RembLimit = DataRate::KilobitsPerSec(250);
+ client->SetRemoteBitrate(RembLimit);
+ s.RunFor(TimeDelta::Seconds(1));
+ EXPECT_EQ(client->send_bandwidth(), RembLimit);
+
+ DataRate RembLimitLifted = DataRate::KilobitsPerSec(10000);
+ client->SetRemoteBitrate(RembLimitLifted);
+ s.RunFor(TimeDelta::Seconds(10));
+
+ return client->send_bandwidth();
+}
} // namespace
class GoogCcNetworkControllerTest : public ::testing::Test {
@@ -850,33 +879,17 @@ TEST_F(GoogCcNetworkControllerTest, IsFairToTCP) {
EXPECT_LT(client->send_bandwidth().kbps(), 750);
}
-TEST(GoogCcScenario, RampupOnRembCapLifted) {
+TEST(GoogCcScenario, FastRampupOnRembCapLiftedWithFieldTrial) {
ScopedFieldTrials trial("WebRTC-Bwe-ReceiverLimitCapsOnly/Enabled/");
- Scenario s("googcc_unit/rampup_ramb_cap_lifted");
- NetworkSimulationConfig net_conf;
- net_conf.bandwidth = DataRate::KilobitsPerSec(2000);
- net_conf.delay = TimeDelta::Millis(50);
- auto* client = s.CreateClient("send", [&](CallClientConfig* c) {
- c->transport.rates.start_rate = DataRate::KilobitsPerSec(1000);
- });
- auto send_net = {s.CreateSimulationNode(net_conf)};
- auto ret_net = {s.CreateSimulationNode(net_conf)};
- auto* route = s.CreateRoutes(
- client, send_net, s.CreateClient("return", CallClientConfig()), ret_net);
- s.CreateVideoStream(route->forward(), VideoStreamConfig());
-
- s.RunFor(TimeDelta::Seconds(10));
- EXPECT_GT(client->send_bandwidth().kbps(), 1500);
-
- DataRate RembLimit = DataRate::KilobitsPerSec(250);
- client->SetRemoteBitrate(RembLimit);
- s.RunFor(TimeDelta::Seconds(1));
- EXPECT_EQ(client->send_bandwidth(), RembLimit);
+ DataRate final_estimate =
+ RunRembDipScenario("googcc_unit/fast_rampup_on_remb_cap_lifted");
+ EXPECT_GT(final_estimate.kbps(), 1500);
+}
- DataRate RembLimitLifted = DataRate::KilobitsPerSec(10000);
- client->SetRemoteBitrate(RembLimitLifted);
- s.RunFor(TimeDelta::Seconds(10));
- EXPECT_GT(client->send_bandwidth().kbps(), 1500);
+TEST(GoogCcScenario, SlowRampupOnRembCapLifted) {
+ DataRate final_estimate =
+ RunRembDipScenario("googcc_unit/default_slow_rampup_on_remb_cap_lifted");
+ EXPECT_LT(final_estimate.kbps(), 1000);
}
} // namespace test