Use a new instance of RTP stack for each test.
- Reusing RTP stack may have contributed to some flakiness as the previous state could have persisted to new test being performed. Bug: webrtc:13241 Change-Id: Idf70b56bd3377bc99321fddf7191d7a72c37b085 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/237540 Reviewed-by: Gustaf Ullberg <gustaf@webrtc.org> Commit-Queue: Tim Na <natim@webrtc.org> Cr-Commit-Position: refs/heads/main@{#35336}
This commit is contained in:
parent
c86e1c2e70
commit
1d73243466
@ -57,7 +57,6 @@ class AudioEgressTest : public ::testing::Test {
|
||||
|
||||
AudioEgressTest()
|
||||
: fake_clock_(kStartTime), wave_generator_(1000.0, kAudioLevel) {
|
||||
rtp_rtcp_ = CreateRtpStack(&fake_clock_, &transport_, kRemoteSsrc);
|
||||
task_queue_factory_ = CreateDefaultTaskQueueFactory();
|
||||
encoder_factory_ = CreateBuiltinAudioEncoderFactory();
|
||||
}
|
||||
@ -65,6 +64,7 @@ class AudioEgressTest : public ::testing::Test {
|
||||
// Prepare test on audio egress by using PCMu codec with specific
|
||||
// sequence number and its status to be running.
|
||||
void SetUp() override {
|
||||
rtp_rtcp_ = CreateRtpStack(&fake_clock_, &transport_, kRemoteSsrc);
|
||||
egress_ = std::make_unique<AudioEgress>(rtp_rtcp_.get(), &fake_clock_,
|
||||
task_queue_factory_.get());
|
||||
constexpr int kPcmuPayload = 0;
|
||||
@ -81,6 +81,7 @@ class AudioEgressTest : public ::testing::Test {
|
||||
egress_->StopSend();
|
||||
rtp_rtcp_->SetSendingStatus(false);
|
||||
egress_.reset();
|
||||
rtp_rtcp_.reset();
|
||||
}
|
||||
|
||||
// Create an audio frame prepared for pcmu encoding. Timestamp is
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user