From b51c0ce2718b55480e2673930ce004f56bad0f9c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Bostr=C3=B6m?= Date: Thu, 6 Apr 2023 10:29:19 +0000 Subject: [PATCH] Revert "Close PC before test ends to reduce risk of flake." MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 727014a5f1d55d1ad28f2e0ef95eebf98abee28d. Reason for revert: This didn't seem to help and we should be closing the PC automatically anyway (in ~PeerConnectionTestWrapper) Original change's description: > Close PC before test ends to reduce risk of flake. > > From the logs I can't tell if close is happening or not on the bots. > Let's make it explicit just in case. > > Bug: webrtc:15018 > Change-Id: Icfa7fe8587d1516a9ef31e86ade920a6023e619b > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/300364 > Commit-Queue: Henrik Boström > Auto-Submit: Henrik Boström > Reviewed-by: Jeremy Leconte > Commit-Queue: Jeremy Leconte > Cr-Commit-Position: refs/heads/main@{#39768} Bug: webrtc:15018 Change-Id: I6ee693f382a5d104b2b0088d0c1dae7ae39501d1 No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/300520 Bot-Commit: rubber-stamper@appspot.gserviceaccount.com Commit-Queue: Henrik Boström Cr-Commit-Position: refs/heads/main@{#39778} --- pc/peer_connection_simulcast_unittest.cc | 48 ------------------------ 1 file changed, 48 deletions(-) diff --git a/pc/peer_connection_simulcast_unittest.cc b/pc/peer_connection_simulcast_unittest.cc index acd1da1d0a..f975d370c7 100644 --- a/pc/peer_connection_simulcast_unittest.cc +++ b/pc/peer_connection_simulcast_unittest.cc @@ -1167,10 +1167,6 @@ TEST_F(PeerConnectionSimulcastWithMediaFlowTests, EXPECT_THAT(GetCurrentCodecMimeType(report, *outbound_rtps[0]), StrCaseEq("video/VP8")); EXPECT_THAT(*outbound_rtps[0]->scalability_mode, StrEq("L1T1")); - - // Cleanup that may be needed due to webrtc:15018. - RTC_LOG(LS_INFO) << "Closing local PC."; - local_pc_wrapper->pc()->Close(); } TEST_F(PeerConnectionSimulcastWithMediaFlowTests, @@ -1212,10 +1208,6 @@ TEST_F(PeerConnectionSimulcastWithMediaFlowTests, EXPECT_THAT(*outbound_rtps[0]->scalability_mode, StrEq("L1T3")); EXPECT_THAT(*outbound_rtps[1]->scalability_mode, StrEq("L1T3")); EXPECT_THAT(*outbound_rtps[2]->scalability_mode, StrEq("L1T3")); - - // Cleanup that may be needed due to webrtc:15018. - RTC_LOG(LS_INFO) << "Closing local PC."; - local_pc_wrapper->pc()->Close(); } TEST_F(PeerConnectionSimulcastWithMediaFlowTests, @@ -1264,10 +1256,6 @@ TEST_F(PeerConnectionSimulcastWithMediaFlowTests, parameters = sender->GetParameters(); ASSERT_EQ(parameters.encodings.size(), 1u); EXPECT_THAT(parameters.encodings[0].scalability_mode, Eq(absl::nullopt)); - - // Cleanup that may be needed due to webrtc:15018. - RTC_LOG(LS_INFO) << "Closing local PC."; - local_pc_wrapper->pc()->Close(); } TEST_F(PeerConnectionSimulcastWithMediaFlowTests, @@ -1325,10 +1313,6 @@ TEST_F(PeerConnectionSimulcastWithMediaFlowTests, EXPECT_THAT(GetCurrentCodecMimeType(report, *outbound_rtps[0]), StrCaseEq("video/VP8")); EXPECT_THAT(*outbound_rtps[0]->scalability_mode, StrEq("L1T2")); - - // Cleanup that may be needed due to webrtc:15018. - RTC_LOG(LS_INFO) << "Closing local PC."; - local_pc_wrapper->pc()->Close(); } #if defined(WEBRTC_USE_H264) @@ -1372,10 +1356,6 @@ TEST_F(PeerConnectionSimulcastWithMediaFlowTests, EXPECT_THAT(*outbound_rtps[0]->scalability_mode, StrEq("L1T3")); EXPECT_THAT(*outbound_rtps[1]->scalability_mode, StrEq("L1T3")); EXPECT_THAT(*outbound_rtps[2]->scalability_mode, StrEq("L1T3")); - - // Cleanup that may be needed due to webrtc:15018. - RTC_LOG(LS_INFO) << "Closing local PC."; - local_pc_wrapper->pc()->Close(); } #endif // defined(WEBRTC_USE_H264) @@ -1425,10 +1405,6 @@ TEST_F(PeerConnectionSimulcastWithMediaFlowTests, EXPECT_FALSE(encodings[0].scalability_mode.has_value()); EXPECT_FALSE(encodings[1].scalability_mode.has_value()); EXPECT_FALSE(encodings[2].scalability_mode.has_value()); - - // Cleanup that may be needed due to webrtc:15018. - RTC_LOG(LS_INFO) << "Closing local PC."; - local_pc_wrapper->pc()->Close(); } // The spec-compliant way to configure SVC for a single stream. The expected @@ -1479,10 +1455,6 @@ TEST_F(PeerConnectionSimulcastWithMediaFlowTests, ASSERT_EQ(parameters.encodings.size(), 1u); EXPECT_THAT(parameters.encodings[0].scalability_mode, Optional(std::string("L3T3_KEY"))); - - // Cleanup that may be needed due to webrtc:15018. - RTC_LOG(LS_INFO) << "Closing local PC."; - local_pc_wrapper->pc()->Close(); } // The {active,inactive,inactive} case is technically simulcast but since we @@ -1535,10 +1507,6 @@ TEST_F(PeerConnectionSimulcastWithMediaFlowTests, Optional(std::string("L3T3_KEY"))); EXPECT_FALSE(parameters.encodings[1].scalability_mode.has_value()); EXPECT_FALSE(parameters.encodings[2].scalability_mode.has_value()); - - // Cleanup that may be needed due to webrtc:15018. - RTC_LOG(LS_INFO) << "Closing local PC."; - local_pc_wrapper->pc()->Close(); } TEST_F(PeerConnectionSimulcastWithMediaFlowTests, @@ -1603,10 +1571,6 @@ TEST_F(PeerConnectionSimulcastWithMediaFlowTests, EXPECT_THAT(*outbound_rtps[0]->scalability_mode, StrEq("L1T3")); EXPECT_THAT(*outbound_rtps[1]->scalability_mode, StrEq("L1T3")); EXPECT_THAT(*outbound_rtps[2]->scalability_mode, StrEq("L1T3")); - - // Cleanup that may be needed due to webrtc:15018. - RTC_LOG(LS_INFO) << "Closing local PC."; - local_pc_wrapper->pc()->Close(); } // Exercise common path where `scalability_mode` is not specified until after @@ -1665,10 +1629,6 @@ TEST_F(PeerConnectionSimulcastWithMediaFlowTests, Optional(std::string("L2T2_KEY"))); EXPECT_FALSE(parameters.encodings[1].scalability_mode.has_value()); EXPECT_FALSE(parameters.encodings[2].scalability_mode.has_value()); - - // Cleanup that may be needed due to webrtc:15018. - RTC_LOG(LS_INFO) << "Closing local PC."; - local_pc_wrapper->pc()->Close(); } TEST_F(PeerConnectionSimulcastWithMediaFlowTests, @@ -1710,10 +1670,6 @@ TEST_F(PeerConnectionSimulcastWithMediaFlowTests, EXPECT_EQ(*outbound_rtps[0]->bytes_sent, 0u); EXPECT_EQ(*outbound_rtps[1]->bytes_sent, 0u); EXPECT_EQ(*outbound_rtps[2]->bytes_sent, 0u); - - // Cleanup that may be needed due to webrtc:15018. - RTC_LOG(LS_INFO) << "Closing local PC."; - local_pc_wrapper->pc()->Close(); } TEST_F(PeerConnectionSimulcastWithMediaFlowTests, @@ -1789,10 +1745,6 @@ TEST_F(PeerConnectionSimulcastWithMediaFlowTests, EXPECT_THAT(*outbound_rtps[0]->scalability_mode, StrEq("L1T3")); EXPECT_THAT(*outbound_rtps[1]->scalability_mode, StrEq("L1T3")); EXPECT_THAT(*outbound_rtps[2]->scalability_mode, StrEq("L1T3")); - - // Cleanup that may be needed due to webrtc:15018. - RTC_LOG(LS_INFO) << "Closing local PC."; - local_pc_wrapper->pc()->Close(); } } // namespace webrtc