From 20f9401578d64d2d0fd7dc8163ec221627357202 Mon Sep 17 00:00:00 2001 From: Harald Alvestrand Date: Fri, 21 May 2021 07:04:27 +0000 Subject: [PATCH] Remove GTEST_ALLOW_UNINSTANTIATED in datachannel tests The tests are now all gated behind a singe WEBRTC_HAVE_SCTP flag, including the invocations, so the issue of configs that vary which tests are included should have gone away. This CL also clears out the remains of DataChannelIntegrationTestWithFakeClock, which is no longer used. Bug: webrtc:12525 Change-Id: Ie0133e3e84358e9238b8e7465200f000519b8765 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/219783 Reviewed-by: Mirko Bonadei Reviewed-by: Florent Castelli Commit-Queue: Harald Alvestrand Cr-Commit-Position: refs/heads/master@{#34085} --- pc/data_channel_integrationtest.cc | 22 +++------------------- 1 file changed, 3 insertions(+), 19 deletions(-) diff --git a/pc/data_channel_integrationtest.cc b/pc/data_channel_integrationtest.cc index 1deeb55048..47ea74a4b2 100644 --- a/pc/data_channel_integrationtest.cc +++ b/pc/data_channel_integrationtest.cc @@ -34,6 +34,9 @@ namespace webrtc { namespace { +// All tests in this file require SCTP support. +#ifdef WEBRTC_HAVE_SCTP + class DataChannelIntegrationTest : public PeerConnectionIntegrationBaseTest, public ::testing::WithParamInterface< std::tuple> { @@ -43,8 +46,6 @@ class DataChannelIntegrationTest : public PeerConnectionIntegrationBaseTest, std::get<1>(GetParam())) {} }; -GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(DataChannelIntegrationTest); - // Fake clock must be set before threads are started to prevent race on // Set/GetClockForTesting(). // To achieve that, multiple inheritance is used as a mixin pattern @@ -64,11 +65,6 @@ class FakeClockForTest : public rtc::ScopedFakeClock { ScopedFakeClock& FakeClock() { return *this; } }; -// Ensure FakeClockForTest is constructed first (see class for rationale). -class DataChannelIntegrationTestWithFakeClock - : public FakeClockForTest, - public DataChannelIntegrationTest {}; - class DataChannelIntegrationTestPlanB : public PeerConnectionIntegrationBaseTest { protected: @@ -76,9 +72,6 @@ class DataChannelIntegrationTestPlanB : PeerConnectionIntegrationBaseTest(SdpSemantics::kPlanB) {} }; -GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST( - DataChannelIntegrationTestWithFakeClock); - class DataChannelIntegrationTestUnifiedPlan : public PeerConnectionIntegrationBaseTest { protected: @@ -86,8 +79,6 @@ class DataChannelIntegrationTestUnifiedPlan : PeerConnectionIntegrationBaseTest(SdpSemantics::kUnifiedPlan) {} }; -#ifdef WEBRTC_HAVE_SCTP - // This test causes a PeerConnection to enter Disconnected state, and // sends data on a DataChannel while disconnected. // The data should be surfaced when the connection reestablishes. @@ -780,13 +771,6 @@ INSTANTIATE_TEST_SUITE_P( Values("WebRTC-DataChannel-Dcsctp/Enabled/", "WebRTC-DataChannel-Dcsctp/Disabled/"))); -INSTANTIATE_TEST_SUITE_P( - DataChannelIntegrationTest, - DataChannelIntegrationTestWithFakeClock, - Combine(Values(SdpSemantics::kPlanB, SdpSemantics::kUnifiedPlan), - Values("WebRTC-DataChannel-Dcsctp/Enabled/", - "WebRTC-DataChannel-Dcsctp/Disabled/"))); - TEST_F(DataChannelIntegrationTestUnifiedPlan, EndToEndCallWithBundledSctpDataChannel) { ASSERT_TRUE(CreatePeerConnectionWrappers());