From eaa4f3ae3cf6539cf0fc543643c441b704b2c4ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Terelius?= Date: Wed, 8 May 2024 09:58:10 +0200 Subject: [PATCH] Fix nits in simulated network. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit (Spelling, missing includes, unused declaration) Bug: None Change-Id: Ia7b714de1532e7657b5d07c8a98513d2a4430cec Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/350041 Reviewed-by: Jeremy Leconte Reviewed-by: Per Kjellander Commit-Queue: Björn Terelius Cr-Commit-Position: refs/heads/main@{#42287} --- test/network/emulated_network_manager.cc | 2 ++ test/network/network_emulation.cc | 4 ++++ test/network/network_emulation_manager.cc | 3 +++ test/network/network_emulation_unittest.cc | 4 ++-- test/network/simulated_network.cc | 2 +- test/network/simulated_network_unittest.cc | 6 +++--- 6 files changed, 15 insertions(+), 6 deletions(-) diff --git a/test/network/emulated_network_manager.cc b/test/network/emulated_network_manager.cc index fa4037e5db..291ecc16cf 100644 --- a/test/network/emulated_network_manager.cc +++ b/test/network/emulated_network_manager.cc @@ -10,8 +10,10 @@ #include "test/network/emulated_network_manager.h" +#include #include #include +#include #include "absl/memory/memory.h" #include "p2p/base/basic_packet_socket_factory.h" diff --git a/test/network/network_emulation.cc b/test/network/network_emulation.cc index 0a67d54f7e..1be73f0ae0 100644 --- a/test/network/network_emulation.cc +++ b/test/network/network_emulation.cc @@ -13,9 +13,13 @@ #include #include +#include #include +#include #include +#include #include +#include #include "absl/base/nullability.h" #include "absl/types/optional.h" diff --git a/test/network/network_emulation_manager.cc b/test/network/network_emulation_manager.cc index 0896af36dc..dc4bf72c32 100644 --- a/test/network/network_emulation_manager.cc +++ b/test/network/network_emulation_manager.cc @@ -11,7 +11,10 @@ #include "test/network/network_emulation_manager.h" #include +#include #include +#include +#include #include "api/field_trials_view.h" #include "api/units/time_delta.h" diff --git a/test/network/network_emulation_unittest.cc b/test/network/network_emulation_unittest.cc index 761236cdc1..805a1bf31e 100644 --- a/test/network/network_emulation_unittest.cc +++ b/test/network/network_emulation_unittest.cc @@ -11,6 +11,8 @@ #include "test/network/network_emulation.h" #include +#include +#include #include #include @@ -177,8 +179,6 @@ EmulatedNetworkNode* CreateEmulatedNodeWithDefaultBuiltInConfig( } // namespace -using ::testing::_; - TEST(NetworkEmulationManagerTest, GeneratedIpv4AddressDoesNotCollide) { NetworkEmulationManagerImpl network_manager( {.time_mode = TimeMode::kRealTime}); diff --git a/test/network/simulated_network.cc b/test/network/simulated_network.cc index 67e3a0a146..5fe68b7dc3 100644 --- a/test/network/simulated_network.cc +++ b/test/network/simulated_network.cc @@ -175,7 +175,7 @@ bool SimulatedNetwork::EnqueuePacket(PacketInFlightInfo packet) { // Only update `next_process_time_` if not already set. Otherwise, // next_process_time_ is calculated when a packet is dequeued. Note that this - // means that the newly enqueud packet risk having an arrival time before + // means that the newly enqueued packet risk having an arrival time before // `next_process_time_` if packet reordering is allowed and // config.delay_standard_deviation_ms is set. // TODO(bugs.webrtc.org/14525): Consider preventing this. diff --git a/test/network/simulated_network_unittest.cc b/test/network/simulated_network_unittest.cc index 77026655dc..fa04e8a2da 100644 --- a/test/network/simulated_network_unittest.cc +++ b/test/network/simulated_network_unittest.cc @@ -468,7 +468,7 @@ TEST(SimulatedNetworkTest, QueueDelayMsWithStandardDeviationAndReorderAllowed) { } TEST(SimulatedNetworkTest, PacketLoss) { - // On a network with 50% probablility of packet loss ... + // On a network with 50% probability of packet loss ... SimulatedNetwork network = SimulatedNetwork({.loss_percent = 50}, /*random_seed =*/1); @@ -494,7 +494,7 @@ TEST(SimulatedNetworkTest, PacketLoss) { } TEST(SimulatedNetworkTest, NextDeliveryTimeSetAfterLostPackets) { - // On a network with 50% probablility of packet loss ... + // On a network with 50% probability of packet loss ... SimulatedNetwork network = SimulatedNetwork( {.queue_delay_ms = 10, .link_capacity_kbps = 1000, .loss_percent = 50}, /*random_seed =*/1); @@ -534,7 +534,7 @@ TEST(SimulatedNetworkTest, NextDeliveryTimeSetAfterLostPackets) { } TEST(SimulatedNetworkTest, PacketLossBurst) { - // On a network with 50% probablility of packet loss and an average burst + // On a network with 50% probability of packet loss and an average burst // loss length of 100 ... SimulatedNetwork network = SimulatedNetwork( {.loss_percent = 50, .avg_burst_loss_length = 100}, /*random_seed=*/1);