mirror of
https://github.com/mollyim/webrtc.git
synced 2025-05-12 21:30:45 +01:00
Fix nits in simulated network.
(Spelling, missing includes, unused declaration) Bug: None Change-Id: Ia7b714de1532e7657b5d07c8a98513d2a4430cec Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/350041 Reviewed-by: Jeremy Leconte <jleconte@webrtc.org> Reviewed-by: Per Kjellander <perkj@webrtc.org> Commit-Queue: Björn Terelius <terelius@webrtc.org> Cr-Commit-Position: refs/heads/main@{#42287}
This commit is contained in:
parent
67ba914249
commit
eaa4f3ae3c
6 changed files with 15 additions and 6 deletions
|
@ -10,8 +10,10 @@
|
|||
|
||||
#include "test/network/emulated_network_manager.h"
|
||||
|
||||
#include <functional>
|
||||
#include <memory>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
#include "absl/memory/memory.h"
|
||||
#include "p2p/base/basic_packet_socket_factory.h"
|
||||
|
|
|
@ -13,9 +13,13 @@
|
|||
#include <stdint.h>
|
||||
|
||||
#include <algorithm>
|
||||
#include <functional>
|
||||
#include <limits>
|
||||
#include <map>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
#include "absl/base/nullability.h"
|
||||
#include "absl/types/optional.h"
|
||||
|
|
|
@ -11,7 +11,10 @@
|
|||
#include "test/network/network_emulation_manager.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <functional>
|
||||
#include <memory>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
#include "api/field_trials_view.h"
|
||||
#include "api/units/time_delta.h"
|
||||
|
|
|
@ -11,6 +11,8 @@
|
|||
#include "test/network/network_emulation.h"
|
||||
|
||||
#include <atomic>
|
||||
#include <functional>
|
||||
#include <map>
|
||||
#include <memory>
|
||||
#include <set>
|
||||
|
||||
|
@ -177,8 +179,6 @@ EmulatedNetworkNode* CreateEmulatedNodeWithDefaultBuiltInConfig(
|
|||
|
||||
} // namespace
|
||||
|
||||
using ::testing::_;
|
||||
|
||||
TEST(NetworkEmulationManagerTest, GeneratedIpv4AddressDoesNotCollide) {
|
||||
NetworkEmulationManagerImpl network_manager(
|
||||
{.time_mode = TimeMode::kRealTime});
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue