Fix flaky test VideoSendStreamTest.SendsKeepAlive
Since the keep-alive payload type is not registered in the payload type
map of FakeNetworkPipe, it will cause a DCHECK to trigger unless we're
able to destroy the call before that.
Just register it in the fake network as media type "any", it will be
discarded early on the receive side anyway.
BUG=webrt:7964
Review-Url: https://codereview.webrtc.org/2979543002
Cr-Commit-Position: refs/heads/master@{#18953}
diff --git a/webrtc/test/call_test.cc b/webrtc/test/call_test.cc
index fc3fc68..c1db322 100644
--- a/webrtc/test/call_test.cc
+++ b/webrtc/test/call_test.cc
@@ -437,6 +437,9 @@
const uint32_t CallTest::kReceiverLocalAudioSsrc = 0x1234567;
const int CallTest::kNackRtpHistoryMs = 1000;
+const uint8_t CallTest::kDefaultKeepalivePayloadType =
+ RtpKeepAliveConfig().payload_type;
+
const std::map<uint8_t, MediaType> CallTest::payload_type_map_ = {
{CallTest::kVideoSendPayloadType, MediaType::VIDEO},
{CallTest::kFakeVideoSendPayloadType, MediaType::VIDEO},
@@ -445,7 +448,8 @@
{CallTest::kRtxRedPayloadType, MediaType::VIDEO},
{CallTest::kUlpfecPayloadType, MediaType::VIDEO},
{CallTest::kFlexfecPayloadType, MediaType::VIDEO},
- {CallTest::kAudioSendPayloadType, MediaType::AUDIO}};
+ {CallTest::kAudioSendPayloadType, MediaType::AUDIO},
+ {CallTest::kDefaultKeepalivePayloadType, MediaType::ANY}};
BaseTest::BaseTest() : event_log_(RtcEventLog::CreateNull()) {}