From f5c1909b54e715fe2a4b7fb01261caae533d84d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrik=20H=C3=B6glund?= Date: Thu, 20 Feb 2020 14:10:38 +0100 Subject: [PATCH] Make pc level smoke tests faster. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit They go from 7 seconds each to 2 seconds each with this change, and I belive they will catch correctness bugs just as well. With this and https://webrtc-review.googlesource.com/c/src/+/168884, test_support_unittests now runs in 14 seconds instead of 65 (in sequential mode). Bug: None Change-Id: Ic04e3937bbff54f33dcd062f422dada176f1c3cb Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/168885 Commit-Queue: Patrik Höglund Reviewed-by: Artem Titov Cr-Commit-Position: refs/heads/master@{#30577} --- test/pc/e2e/peer_connection_e2e_smoke_test.cc | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/test/pc/e2e/peer_connection_e2e_smoke_test.cc b/test/pc/e2e/peer_connection_e2e_smoke_test.cc index 105f4d0021..b136f59bb7 100644 --- a/test/pc/e2e/peer_connection_e2e_smoke_test.cc +++ b/test/pc/e2e/peer_connection_e2e_smoke_test.cc @@ -111,11 +111,11 @@ class PeerConnectionE2EQualityTestSmokeTest : public ::testing::Test { for (auto stream_label : video_analyzer_ptr->GetKnownVideoStreams()) { FrameCounters stream_conters = video_analyzer_ptr->GetPerStreamCounters().at(stream_label); - // 150 = 30fps * 5s. On some devices pipeline can be too slow, so it can - // happen, that frames will stuck in the middle, so we actually can't - // force real constraints here, so lets just check, that at least 1 frame - // passed whole pipeline. - EXPECT_GE(stream_conters.captured, 150); + // On some devices the pipeline can be too slow, so we actually can't + // force real constraints here. Lets just check, that at least 1 + // frame passed whole pipeline. + int64_t expected_min_fps = run_params.run_duration.seconds() * 30; + EXPECT_GE(stream_conters.captured, expected_min_fps); EXPECT_GE(stream_conters.pre_encoded, 1); EXPECT_GE(stream_conters.encoded, 1); EXPECT_GE(stream_conters.received, 1); @@ -134,7 +134,7 @@ class PeerConnectionE2EQualityTestSmokeTest : public ::testing::Test { #define MAYBE_Smoke Smoke #endif TEST_F(PeerConnectionE2EQualityTestSmokeTest, MAYBE_Smoke) { - RunParams run_params(TimeDelta::Seconds(7)); + RunParams run_params(TimeDelta::Seconds(2)); run_params.video_codecs = { VideoCodecConfig(cricket::kVp9CodecName, {{"profile-id", "0"}})}; run_params.use_flex_fec = true; @@ -188,7 +188,7 @@ TEST_F(PeerConnectionE2EQualityTestSmokeTest, MAYBE_Smoke) { #define MAYBE_Echo Echo #endif TEST_F(PeerConnectionE2EQualityTestSmokeTest, MAYBE_Echo) { - RunParams run_params(TimeDelta::Seconds(7)); + RunParams run_params(TimeDelta::Seconds(2)); run_params.echo_emulation_config = EchoEmulationConfig(); RunTest( "smoke", run_params, @@ -218,7 +218,7 @@ TEST_F(PeerConnectionE2EQualityTestSmokeTest, MAYBE_Echo) { #define MAYBE_Simulcast Simulcast #endif TEST_F(PeerConnectionE2EQualityTestSmokeTest, MAYBE_Simulcast) { - RunParams run_params(TimeDelta::Seconds(7)); + RunParams run_params(TimeDelta::Seconds(2)); run_params.video_codecs = {VideoCodecConfig(cricket::kVp8CodecName)}; RunTest( "simulcast", run_params, @@ -256,7 +256,7 @@ TEST_F(PeerConnectionE2EQualityTestSmokeTest, MAYBE_Simulcast) { #define MAYBE_Svc Svc #endif TEST_F(PeerConnectionE2EQualityTestSmokeTest, MAYBE_Svc) { - RunParams run_params(TimeDelta::Seconds(7)); + RunParams run_params(TimeDelta::Seconds(2)); run_params.video_codecs = {VideoCodecConfig(cricket::kVp9CodecName)}; RunTest( "simulcast", run_params, @@ -296,7 +296,7 @@ TEST_F(PeerConnectionE2EQualityTestSmokeTest, MAYBE_Svc) { #define MAYBE_HighBitrate HighBitrate #endif TEST_F(PeerConnectionE2EQualityTestSmokeTest, MAYBE_HighBitrate) { - RunParams run_params(TimeDelta::Seconds(7)); + RunParams run_params(TimeDelta::Seconds(2)); run_params.video_codecs = { VideoCodecConfig(cricket::kVp9CodecName, {{"profile-id", "0"}})};