A test to verify counter on discarded packet upon reordering.
Bug: webrtc:8199 Change-Id: Ia8c545e4ae0ff98c22031b633d1bca4ba58e9e7b Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/229380 Commit-Queue: Minyue Li <minyue@webrtc.org> Reviewed-by: Jakob Ivarsson <jakobi@webrtc.org> Cr-Commit-Position: refs/heads/master@{#34804}
This commit is contained in:

committed by
WebRTC LUCI CQ

parent
cc69ea4a93
commit
57d13105e5
@ -550,6 +550,7 @@ TEST_F(NetEqImplTest, VerifyTimestampPropagation) {
|
|||||||
|
|
||||||
TEST_F(NetEqImplTest, ReorderedPacket) {
|
TEST_F(NetEqImplTest, ReorderedPacket) {
|
||||||
UseNoMocks();
|
UseNoMocks();
|
||||||
|
|
||||||
// Create a mock decoder object.
|
// Create a mock decoder object.
|
||||||
MockAudioDecoder mock_decoder;
|
MockAudioDecoder mock_decoder;
|
||||||
|
|
||||||
@ -648,6 +649,9 @@ TEST_F(NetEqImplTest, ReorderedPacket) {
|
|||||||
// out-of-order packet should have been discarded.
|
// out-of-order packet should have been discarded.
|
||||||
EXPECT_TRUE(packet_buffer_->Empty());
|
EXPECT_TRUE(packet_buffer_->Empty());
|
||||||
|
|
||||||
|
// NetEq `discarded_primary_packets` should capture this packet discard.
|
||||||
|
EXPECT_EQ(1u, neteq_->GetOperationsAndState().discarded_primary_packets);
|
||||||
|
|
||||||
// Verify `output.packet_infos_`. Expect to only see the second packet.
|
// Verify `output.packet_infos_`. Expect to only see the second packet.
|
||||||
ASSERT_THAT(output.packet_infos_, SizeIs(1));
|
ASSERT_THAT(output.packet_infos_, SizeIs(1));
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user