From 18486c55745d8c90ebd758fe8ff7d97e745c94df Mon Sep 17 00:00:00 2001 From: Harald Alvestrand Date: Mon, 16 Sep 2024 11:26:38 +0000 Subject: [PATCH] Make GetSourcesVideo test wait for two frames When it waits for only one frame, the test is flaky. When it waits for two frames, it is not. # Relying on triviality for confidence due to purple bots atm, # see b/367211396 NOTRY=True NOPRESUBMIT=True Bug: webrtc:367205682, webrtc:42220900 Change-Id: I14963b7a86961f438fd511aba8f29525e1f19750 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/362583 Commit-Queue: Harald Alvestrand Reviewed-by: Florent Castelli Cr-Commit-Position: refs/heads/main@{#43025} --- pc/peer_connection_integrationtest.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pc/peer_connection_integrationtest.cc b/pc/peer_connection_integrationtest.cc index 774e08b4f6..777d312829 100644 --- a/pc/peer_connection_integrationtest.cc +++ b/pc/peer_connection_integrationtest.cc @@ -2637,9 +2637,10 @@ TEST_P(PeerConnectionIntegrationTest, GetSourcesVideo) { caller()->AddVideoTrack(); caller()->CreateAndSetAndSignalOffer(); ASSERT_TRUE_WAIT(SignalingStateStable(), kDefaultTimeout); - // Wait for one video frame to be received by the callee. + // Wait for two video frames to be received by the callee. + // TODO: https://issues.webrtc.org/42220900 - wait for only one frame again MediaExpectations media_expectations; - media_expectations.CalleeExpectsSomeVideo(1); + media_expectations.CalleeExpectsSomeVideo(2); ASSERT_TRUE(ExpectNewFrames(media_expectations)); ASSERT_EQ(callee()->pc()->GetReceivers().size(), 1u); auto receiver = callee()->pc()->GetReceivers()[0];