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 <mbonadei@webrtc.org>
Reviewed-by: Florent Castelli <orphis@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34085}
This commit is contained in:
Harald Alvestrand
2021-05-21 07:04:27 +00:00
committed by WebRTC LUCI CQ
parent 32ee3b88ea
commit 20f9401578

View File

@ -34,6 +34,9 @@ namespace webrtc {
namespace { namespace {
// All tests in this file require SCTP support.
#ifdef WEBRTC_HAVE_SCTP
class DataChannelIntegrationTest : public PeerConnectionIntegrationBaseTest, class DataChannelIntegrationTest : public PeerConnectionIntegrationBaseTest,
public ::testing::WithParamInterface< public ::testing::WithParamInterface<
std::tuple<SdpSemantics, std::string>> { std::tuple<SdpSemantics, std::string>> {
@ -43,8 +46,6 @@ class DataChannelIntegrationTest : public PeerConnectionIntegrationBaseTest,
std::get<1>(GetParam())) {} std::get<1>(GetParam())) {}
}; };
GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(DataChannelIntegrationTest);
// Fake clock must be set before threads are started to prevent race on // Fake clock must be set before threads are started to prevent race on
// Set/GetClockForTesting(). // Set/GetClockForTesting().
// To achieve that, multiple inheritance is used as a mixin pattern // To achieve that, multiple inheritance is used as a mixin pattern
@ -64,11 +65,6 @@ class FakeClockForTest : public rtc::ScopedFakeClock {
ScopedFakeClock& FakeClock() { return *this; } ScopedFakeClock& FakeClock() { return *this; }
}; };
// Ensure FakeClockForTest is constructed first (see class for rationale).
class DataChannelIntegrationTestWithFakeClock
: public FakeClockForTest,
public DataChannelIntegrationTest {};
class DataChannelIntegrationTestPlanB class DataChannelIntegrationTestPlanB
: public PeerConnectionIntegrationBaseTest { : public PeerConnectionIntegrationBaseTest {
protected: protected:
@ -76,9 +72,6 @@ class DataChannelIntegrationTestPlanB
: PeerConnectionIntegrationBaseTest(SdpSemantics::kPlanB) {} : PeerConnectionIntegrationBaseTest(SdpSemantics::kPlanB) {}
}; };
GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(
DataChannelIntegrationTestWithFakeClock);
class DataChannelIntegrationTestUnifiedPlan class DataChannelIntegrationTestUnifiedPlan
: public PeerConnectionIntegrationBaseTest { : public PeerConnectionIntegrationBaseTest {
protected: protected:
@ -86,8 +79,6 @@ class DataChannelIntegrationTestUnifiedPlan
: PeerConnectionIntegrationBaseTest(SdpSemantics::kUnifiedPlan) {} : PeerConnectionIntegrationBaseTest(SdpSemantics::kUnifiedPlan) {}
}; };
#ifdef WEBRTC_HAVE_SCTP
// This test causes a PeerConnection to enter Disconnected state, and // This test causes a PeerConnection to enter Disconnected state, and
// sends data on a DataChannel while disconnected. // sends data on a DataChannel while disconnected.
// The data should be surfaced when the connection reestablishes. // The data should be surfaced when the connection reestablishes.
@ -780,13 +771,6 @@ INSTANTIATE_TEST_SUITE_P(
Values("WebRTC-DataChannel-Dcsctp/Enabled/", Values("WebRTC-DataChannel-Dcsctp/Enabled/",
"WebRTC-DataChannel-Dcsctp/Disabled/"))); "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, TEST_F(DataChannelIntegrationTestUnifiedPlan,
EndToEndCallWithBundledSctpDataChannel) { EndToEndCallWithBundledSctpDataChannel) {
ASSERT_TRUE(CreatePeerConnectionWrappers()); ASSERT_TRUE(CreatePeerConnectionWrappers());