Adds test case that would have found potential dead-lock in pacer.
https://webrtc-review.googlesource.com/c/src/+/178100 reverted a change that could result in a deadlock if WebRTC-Audio-SendSideBwe was enabled and WebRTC-Audio-ABWENoTWCC was not while using send-side BWE in a mixed audio/video setting. This CL adds an integration test that fails on tsan if above commit is cherry-picked. Bug: webrtc:10809 Change-Id: I5028d5794e5c9e970ccd9b7eb25d5b76a7fa4e58 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/178203 Commit-Queue: Erik Språng <sprang@webrtc.org> Reviewed-by: Sebastian Jansson <srte@webrtc.org> Cr-Commit-Position: refs/heads/master@{#31574}
This commit is contained in:
parent
efc55b0134
commit
000953c8d1
@ -11,6 +11,7 @@
|
||||
|
||||
#include <atomic>
|
||||
|
||||
#include "test/field_trial.h"
|
||||
#include "test/gtest.h"
|
||||
#include "test/logging/memory_log_writer.h"
|
||||
#include "test/scenario/stats_collection.h"
|
||||
@ -141,5 +142,49 @@ TEST(ScenarioTest, WritesToRtcEventLog) {
|
||||
EXPECT_GE(storage.logs().at("alice.rtc.dat").size(), 1u);
|
||||
}
|
||||
|
||||
TEST(ScenarioTest,
|
||||
RetransmitsVideoPacketsInAudioAndVideoCallWithSendSideBweAndLoss) {
|
||||
// Make sure audio packets are included in transport feedback.
|
||||
test::ScopedFieldTrials override_field_trials(
|
||||
"WebRTC-Audio-SendSideBwe/Enabled/WebRTC-Audio-ABWENoTWCC/Disabled/");
|
||||
|
||||
Scenario s;
|
||||
CallClientConfig call_client_config;
|
||||
call_client_config.transport.rates.start_rate = DataRate::KilobitsPerSec(300);
|
||||
auto* alice = s.CreateClient("alice", call_client_config);
|
||||
auto* bob = s.CreateClient("bob", call_client_config);
|
||||
NetworkSimulationConfig network_config;
|
||||
// Add some loss and delay.
|
||||
network_config.delay = TimeDelta::Millis(200);
|
||||
network_config.loss_rate = 0.05;
|
||||
auto alice_net = s.CreateSimulationNode(network_config);
|
||||
auto bob_net = s.CreateSimulationNode(network_config);
|
||||
auto route = s.CreateRoutes(alice, {alice_net}, bob, {bob_net});
|
||||
|
||||
// First add an audio stream, then a video stream.
|
||||
// Needed to make sure audio RTP module is selected first when sending
|
||||
// transport feedback message.
|
||||
AudioStreamConfig audio_stream_config;
|
||||
audio_stream_config.encoder.min_rate = DataRate::KilobitsPerSec(6);
|
||||
audio_stream_config.encoder.max_rate = DataRate::KilobitsPerSec(64);
|
||||
audio_stream_config.encoder.allocate_bitrate = true;
|
||||
audio_stream_config.stream.in_bandwidth_estimation = true;
|
||||
s.CreateAudioStream(route->forward(), audio_stream_config);
|
||||
s.CreateAudioStream(route->reverse(), audio_stream_config);
|
||||
|
||||
VideoStreamConfig video_stream_config;
|
||||
auto video = s.CreateVideoStream(route->forward(), video_stream_config);
|
||||
s.CreateVideoStream(route->reverse(), video_stream_config);
|
||||
|
||||
// Run for 10 seconds.
|
||||
s.RunFor(TimeDelta::Seconds(10));
|
||||
// Make sure retransmissions have happened.
|
||||
int retransmit_packets = 0;
|
||||
for (const auto& substream : video->send()->GetStats().substreams) {
|
||||
retransmit_packets += substream.second.rtp_stats.retransmitted.packets;
|
||||
}
|
||||
EXPECT_GT(retransmit_packets, 0);
|
||||
}
|
||||
|
||||
} // namespace test
|
||||
} // namespace webrtc
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user