deflake rtcp-rsize test in TSAN

which is showing up too often in
  https://ci.chromium.org/ui/p/webrtc/builders/try/linux_tsan2
The actual failure seems to be around ice candidate destructors and what
makes this test special is that it accessed local_description() which is now avoided. MsidSignalingInSubsequentOfferAnswer shows a similar usage but seems much less flaky.

BUG=webrtc:340041654

Change-Id: Iba1369c62918c56b0904724f28109a7308cefee3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/351565
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42384}
This commit is contained in:
Philipp Hancke 2024-05-23 13:45:31 -07:00 committed by WebRTC LUCI CQ
parent 7b087121b5
commit 635d365d49

View File

@ -1368,13 +1368,14 @@ TEST_F(SdpOfferAnswerTest, ReducedSizeNotNegotiated) {
auto audio_transceiver = caller->AddTransceiver(cricket::MEDIA_TYPE_AUDIO);
auto video_transceiver = caller->AddTransceiver(cricket::MEDIA_TYPE_VIDEO);
EXPECT_TRUE(caller->CreateOfferAndSetAsLocal());
auto offer = caller->CreateOfferAndSetAsLocal();
ASSERT_NE(offer, nullptr);
std::string sdp;
caller->pc()->local_description()->ToString(&sdp);
offer->ToString(&sdp);
// Remove rtcp-rsize attribute.
auto offer = CreateSessionDescription(
auto modified_offer = CreateSessionDescription(
SdpType::kOffer, absl::StrReplaceAll(sdp, {{"a=rtcp-rsize\r\n", ""}}));
EXPECT_TRUE(callee->SetRemoteDescription(std::move(offer)));
EXPECT_TRUE(callee->SetRemoteDescription(std::move(modified_offer)));
auto answer = callee->CreateAnswerAndSetAsLocal();
EXPECT_TRUE(caller->SetRemoteDescription(std::move(answer)));