Remove obsolete SendPacketMatches* tests from rtp_sender_egress_unittest.
These tests were likely made back when PacketRouter was iterating over the RTP modules to find the correct to send on. Now that this is just a DCHECK, it's already implicitly covered by other tests that actually test the respective packet type functionality. Let's thus just remove these old tests. Bug: webrtc:11340 Change-Id: I244ca7e365378f4e48a601464b5df0e1d07732be Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/219621 Reviewed-by: Danil Chapovalov <danilchap@webrtc.org> Commit-Queue: Erik Språng <sprang@webrtc.org> Cr-Commit-Position: refs/heads/master@{#34116}
This commit is contained in:

committed by
WebRTC LUCI CQ

parent
552169c7db
commit
238da9a57e
@ -1102,98 +1102,6 @@ TEST_P(RtpSenderTest, DontCountVolatileExtensionsIntoOverhead) {
|
|||||||
EXPECT_EQ(rtp_sender()->ExpectedPerPacketOverhead(), 12u);
|
EXPECT_EQ(rtp_sender()->ExpectedPerPacketOverhead(), 12u);
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_P(RtpSenderTest, SendPacketMatchesVideo) {
|
|
||||||
std::unique_ptr<RtpPacketToSend> packet =
|
|
||||||
BuildRtpPacket(kPayload, true, 0, clock_->TimeInMilliseconds());
|
|
||||||
packet->set_packet_type(RtpPacketMediaType::kVideo);
|
|
||||||
|
|
||||||
// Verify sent with correct SSRC.
|
|
||||||
packet = BuildRtpPacket(kPayload, true, 0, clock_->TimeInMilliseconds());
|
|
||||||
packet->SetSsrc(kSsrc);
|
|
||||||
packet->set_packet_type(RtpPacketMediaType::kVideo);
|
|
||||||
rtp_sender_context_->InjectPacket(std::move(packet), PacedPacketInfo());
|
|
||||||
EXPECT_EQ(transport_.packets_sent(), 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
TEST_P(RtpSenderTest, SendPacketMatchesAudio) {
|
|
||||||
std::unique_ptr<RtpPacketToSend> packet =
|
|
||||||
BuildRtpPacket(kPayload, true, 0, clock_->TimeInMilliseconds());
|
|
||||||
packet->set_packet_type(RtpPacketMediaType::kAudio);
|
|
||||||
|
|
||||||
// Verify sent with correct SSRC.
|
|
||||||
packet = BuildRtpPacket(kPayload, true, 0, clock_->TimeInMilliseconds());
|
|
||||||
packet->SetSsrc(kSsrc);
|
|
||||||
packet->set_packet_type(RtpPacketMediaType::kAudio);
|
|
||||||
rtp_sender_context_->InjectPacket(std::move(packet), PacedPacketInfo());
|
|
||||||
EXPECT_EQ(transport_.packets_sent(), 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
TEST_P(RtpSenderTest, SendPacketMatchesRetransmissions) {
|
|
||||||
std::unique_ptr<RtpPacketToSend> packet =
|
|
||||||
BuildRtpPacket(kPayload, true, 0, clock_->TimeInMilliseconds());
|
|
||||||
packet->set_packet_type(RtpPacketMediaType::kRetransmission);
|
|
||||||
|
|
||||||
// Verify sent with correct SSRC (non-RTX).
|
|
||||||
packet = BuildRtpPacket(kPayload, true, 0, clock_->TimeInMilliseconds());
|
|
||||||
packet->SetSsrc(kSsrc);
|
|
||||||
packet->set_packet_type(RtpPacketMediaType::kRetransmission);
|
|
||||||
rtp_sender_context_->InjectPacket(std::move(packet), PacedPacketInfo());
|
|
||||||
EXPECT_EQ(transport_.packets_sent(), 1);
|
|
||||||
|
|
||||||
// RTX retransmission.
|
|
||||||
packet = BuildRtpPacket(kPayload, true, 0, clock_->TimeInMilliseconds());
|
|
||||||
packet->SetSsrc(kRtxSsrc);
|
|
||||||
packet->set_packet_type(RtpPacketMediaType::kRetransmission);
|
|
||||||
rtp_sender_context_->InjectPacket(std::move(packet), PacedPacketInfo());
|
|
||||||
EXPECT_EQ(transport_.packets_sent(), 2);
|
|
||||||
}
|
|
||||||
|
|
||||||
TEST_P(RtpSenderTest, SendPacketMatchesPadding) {
|
|
||||||
std::unique_ptr<RtpPacketToSend> packet =
|
|
||||||
BuildRtpPacket(kPayload, true, 0, clock_->TimeInMilliseconds());
|
|
||||||
packet->set_packet_type(RtpPacketMediaType::kPadding);
|
|
||||||
|
|
||||||
// Verify sent with correct SSRC (non-RTX).
|
|
||||||
packet = BuildRtpPacket(kPayload, true, 0, clock_->TimeInMilliseconds());
|
|
||||||
packet->SetSsrc(kSsrc);
|
|
||||||
packet->set_packet_type(RtpPacketMediaType::kPadding);
|
|
||||||
rtp_sender_context_->InjectPacket(std::move(packet), PacedPacketInfo());
|
|
||||||
EXPECT_EQ(transport_.packets_sent(), 1);
|
|
||||||
|
|
||||||
// RTX padding.
|
|
||||||
packet = BuildRtpPacket(kPayload, true, 0, clock_->TimeInMilliseconds());
|
|
||||||
packet->SetSsrc(kRtxSsrc);
|
|
||||||
packet->set_packet_type(RtpPacketMediaType::kPadding);
|
|
||||||
rtp_sender_context_->InjectPacket(std::move(packet), PacedPacketInfo());
|
|
||||||
EXPECT_EQ(transport_.packets_sent(), 2);
|
|
||||||
}
|
|
||||||
|
|
||||||
TEST_P(RtpSenderTest, SendPacketMatchesFlexfec) {
|
|
||||||
std::unique_ptr<RtpPacketToSend> packet =
|
|
||||||
BuildRtpPacket(kPayload, true, 0, clock_->TimeInMilliseconds());
|
|
||||||
packet->set_packet_type(RtpPacketMediaType::kForwardErrorCorrection);
|
|
||||||
|
|
||||||
// Verify sent with correct SSRC.
|
|
||||||
packet = BuildRtpPacket(kPayload, true, 0, clock_->TimeInMilliseconds());
|
|
||||||
packet->SetSsrc(kFlexFecSsrc);
|
|
||||||
packet->set_packet_type(RtpPacketMediaType::kForwardErrorCorrection);
|
|
||||||
rtp_sender_context_->InjectPacket(std::move(packet), PacedPacketInfo());
|
|
||||||
EXPECT_EQ(transport_.packets_sent(), 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
TEST_P(RtpSenderTest, SendPacketMatchesUlpfec) {
|
|
||||||
std::unique_ptr<RtpPacketToSend> packet =
|
|
||||||
BuildRtpPacket(kPayload, true, 0, clock_->TimeInMilliseconds());
|
|
||||||
packet->set_packet_type(RtpPacketMediaType::kForwardErrorCorrection);
|
|
||||||
|
|
||||||
// Verify sent with correct SSRC.
|
|
||||||
packet = BuildRtpPacket(kPayload, true, 0, clock_->TimeInMilliseconds());
|
|
||||||
packet->SetSsrc(kSsrc);
|
|
||||||
packet->set_packet_type(RtpPacketMediaType::kForwardErrorCorrection);
|
|
||||||
rtp_sender_context_->InjectPacket(std::move(packet), PacedPacketInfo());
|
|
||||||
EXPECT_EQ(transport_.packets_sent(), 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
TEST_P(RtpSenderTest, SendPacketHandlesRetransmissionHistory) {
|
TEST_P(RtpSenderTest, SendPacketHandlesRetransmissionHistory) {
|
||||||
rtp_sender_context_->packet_history_.SetStorePacketsStatus(
|
rtp_sender_context_->packet_history_.SetStorePacketsStatus(
|
||||||
RtpPacketHistory::StorageMode::kStoreAndCull, 10);
|
RtpPacketHistory::StorageMode::kStoreAndCull, 10);
|
||||||
|
Reference in New Issue
Block a user