Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4)

Side by Side Diff: talk/app/webrtc/peerconnection_unittest.cc

Issue 1459883002: Disabled several JsepPeerConnectionP2PTestClient tests on Mac, due to flakiness on Debug Mac trybot… (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * libjingle 2 * libjingle
3 * Copyright 2012 Google Inc. 3 * Copyright 2012 Google Inc.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met: 6 * modification, are permitted provided that the following conditions are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright notice, 8 * 1. Redistributions of source code must retain the above copyright notice,
9 * this list of conditions and the following disclaimer. 9 * this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright notice, 10 * 2. Redistributions in binary form must reproduce the above copyright notice,
(...skipping 1141 matching lines...) Expand 10 before | Expand all | Expand 10 after
1152 FakeConstraints setup_constraints; 1152 FakeConstraints setup_constraints;
1153 setup_constraints.AddMandatory(MediaConstraintsInterface::kEnableDtlsSrtp, 1153 setup_constraints.AddMandatory(MediaConstraintsInterface::kEnableDtlsSrtp,
1154 true); 1154 true);
1155 ASSERT_TRUE(CreateTestClients(&setup_constraints, &setup_constraints)); 1155 ASSERT_TRUE(CreateTestClients(&setup_constraints, &setup_constraints));
1156 receiving_client()->SetReceiveAudioVideo(true, false); 1156 receiving_client()->SetReceiveAudioVideo(true, false);
1157 LocalP2PTest(); 1157 LocalP2PTest();
1158 receiving_client()->SetReceiveAudioVideo(true, true); 1158 receiving_client()->SetReceiveAudioVideo(true, true);
1159 receiving_client()->Negotiate(); 1159 receiving_client()->Negotiate();
1160 } 1160 }
1161 1161
1162 // Flaky on Mac Debug bots. See webrtc:5231
1163 #if defined(WEBRTC_MAC) && !defined(WEBRTC_IOS)
1164 #define MAYBE_LocalP2PTestOfferDtlsButNotSdes \
1165 DISABLED_LocalP2PTestOfferDtlsButNotSdes
1166 #else
1167 #define MAYBE_LocalP2PTestOfferDtlsButNotSdes LocalP2PTestOfferDtlsButNotSdes
1168 #endif
1169
1162 // This test sets up a call between two endpoints that are configured to use 1170 // This test sets up a call between two endpoints that are configured to use
1163 // DTLS key agreement. The offerer don't support SDES. As a result, DTLS is 1171 // DTLS key agreement. The offerer don't support SDES. As a result, DTLS is
1164 // negotiated and used for transport. 1172 // negotiated and used for transport.
1165 TEST_F(JsepPeerConnectionP2PTestClient, LocalP2PTestOfferDtlsButNotSdes) { 1173 TEST_F(JsepPeerConnectionP2PTestClient, MAYBE_LocalP2PTestOfferDtlsButNotSdes) {
1166 MAYBE_SKIP_TEST(rtc::SSLStreamAdapter::HaveDtlsSrtp); 1174 MAYBE_SKIP_TEST(rtc::SSLStreamAdapter::HaveDtlsSrtp);
1167 FakeConstraints setup_constraints; 1175 FakeConstraints setup_constraints;
1168 setup_constraints.AddMandatory(MediaConstraintsInterface::kEnableDtlsSrtp, 1176 setup_constraints.AddMandatory(MediaConstraintsInterface::kEnableDtlsSrtp,
1169 true); 1177 true);
1170 ASSERT_TRUE(CreateTestClients(&setup_constraints, &setup_constraints)); 1178 ASSERT_TRUE(CreateTestClients(&setup_constraints, &setup_constraints));
1171 receiving_client()->RemoveSdesCryptoFromReceivedSdp(true); 1179 receiving_client()->RemoveSdesCryptoFromReceivedSdp(true);
1172 LocalP2PTest(); 1180 LocalP2PTest();
1173 VerifyRenderedSize(640, 480); 1181 VerifyRenderedSize(640, 480);
1174 } 1182 }
1175 1183
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
1233 FakeConstraints constraint; 1241 FakeConstraints constraint;
1234 constraint.SetOptionalMaxWidth(320); 1242 constraint.SetOptionalMaxWidth(320);
1235 SetVideoConstraints(constraint, constraint); 1243 SetVideoConstraints(constraint, constraint);
1236 initializing_client()->AddMediaStream(true, true); 1244 initializing_client()->AddMediaStream(true, true);
1237 initializing_client()->AddMediaStream(false, true); 1245 initializing_client()->AddMediaStream(false, true);
1238 ASSERT_EQ(2u, initializing_client()->NumberOfLocalMediaStreams()); 1246 ASSERT_EQ(2u, initializing_client()->NumberOfLocalMediaStreams());
1239 LocalP2PTest(); 1247 LocalP2PTest();
1240 EXPECT_EQ(2u, receiving_client()->number_of_remote_streams()); 1248 EXPECT_EQ(2u, receiving_client()->number_of_remote_streams());
1241 } 1249 }
1242 1250
1251 // Flaky on Mac Debug bots. See webrtc:5231
1252 #if defined(WEBRTC_MAC) && !defined(WEBRTC_IOS)
1253 #define MAYBE_GetAudioOutputLevelStats DISABLED_GetAudioOutputLevelStats
1254 #else
1255 #define MAYBE_GetAudioOutputLevelStats GetAudioOutputLevelStats
1256 #endif
1257
1243 // Test that we can receive the audio output level from a remote audio track. 1258 // Test that we can receive the audio output level from a remote audio track.
1244 TEST_F(JsepPeerConnectionP2PTestClient, GetAudioOutputLevelStats) { 1259 TEST_F(JsepPeerConnectionP2PTestClient, MAYBE_GetAudioOutputLevelStats) {
1245 ASSERT_TRUE(CreateTestClients()); 1260 ASSERT_TRUE(CreateTestClients());
1246 LocalP2PTest(); 1261 LocalP2PTest();
1247 1262
1248 StreamCollectionInterface* remote_streams = 1263 StreamCollectionInterface* remote_streams =
1249 initializing_client()->remote_streams(); 1264 initializing_client()->remote_streams();
1250 ASSERT_GT(remote_streams->count(), 0u); 1265 ASSERT_GT(remote_streams->count(), 0u);
1251 ASSERT_GT(remote_streams->at(0)->GetAudioTracks().size(), 0u); 1266 ASSERT_GT(remote_streams->at(0)->GetAudioTracks().size(), 0u);
1252 MediaStreamTrackInterface* remote_audio_track = 1267 MediaStreamTrackInterface* remote_audio_track =
1253 remote_streams->at(0)->GetAudioTracks()[0]; 1268 remote_streams->at(0)->GetAudioTracks()[0];
1254 1269
1255 // Get the audio output level stats. Note that the level is not available 1270 // Get the audio output level stats. Note that the level is not available
1256 // until a RTCP packet has been received. 1271 // until a RTCP packet has been received.
1257 EXPECT_TRUE_WAIT( 1272 EXPECT_TRUE_WAIT(
1258 initializing_client()->GetAudioOutputLevelStats(remote_audio_track) > 0, 1273 initializing_client()->GetAudioOutputLevelStats(remote_audio_track) > 0,
1259 kMaxWaitForStatsMs); 1274 kMaxWaitForStatsMs);
1260 } 1275 }
1261 1276
1277 // Flaky on Mac Debug bots. See webrtc:5231
1278 #if defined(WEBRTC_MAC) && !defined(WEBRTC_IOS)
1279 #define MAYBE_GetAudioInputLevelStats DISABLED_GetAudioInputLevelStats
1280 #else
1281 #define MAYBE_GetAudioInputLevelStats GetAudioInputLevelStats
1282 #endif
1283
1262 // Test that an audio input level is reported. 1284 // Test that an audio input level is reported.
1263 TEST_F(JsepPeerConnectionP2PTestClient, GetAudioInputLevelStats) { 1285 TEST_F(JsepPeerConnectionP2PTestClient, MAYBE_GetAudioInputLevelStats) {
1264 ASSERT_TRUE(CreateTestClients()); 1286 ASSERT_TRUE(CreateTestClients());
1265 LocalP2PTest(); 1287 LocalP2PTest();
1266 1288
1267 // Get the audio input level stats. The level should be available very 1289 // Get the audio input level stats. The level should be available very
1268 // soon after the test starts. 1290 // soon after the test starts.
1269 EXPECT_TRUE_WAIT(initializing_client()->GetAudioInputLevelStats() > 0, 1291 EXPECT_TRUE_WAIT(initializing_client()->GetAudioInputLevelStats() > 0,
1270 kMaxWaitForStatsMs); 1292 kMaxWaitForStatsMs);
1271 } 1293 }
1272 1294
1295 // Flaky on Mac Debug bots. See webrtc:5231
1296 #if defined(WEBRTC_MAC) && !defined(WEBRTC_IOS)
1297 #define MAYBE_GetBytesReceivedStats DISABLED_GetBytesReceivedStats
1298 #else
1299 #define MAYBE_GetBytesReceivedStats GetBytesReceivedStats
1300 #endif
1301
1273 // Test that we can get incoming byte counts from both audio and video tracks. 1302 // Test that we can get incoming byte counts from both audio and video tracks.
1274 TEST_F(JsepPeerConnectionP2PTestClient, GetBytesReceivedStats) { 1303 TEST_F(JsepPeerConnectionP2PTestClient, MAYBE_GetBytesReceivedStats) {
1275 ASSERT_TRUE(CreateTestClients()); 1304 ASSERT_TRUE(CreateTestClients());
1276 LocalP2PTest(); 1305 LocalP2PTest();
1277 1306
1278 StreamCollectionInterface* remote_streams = 1307 StreamCollectionInterface* remote_streams =
1279 initializing_client()->remote_streams(); 1308 initializing_client()->remote_streams();
1280 ASSERT_GT(remote_streams->count(), 0u); 1309 ASSERT_GT(remote_streams->count(), 0u);
1281 ASSERT_GT(remote_streams->at(0)->GetAudioTracks().size(), 0u); 1310 ASSERT_GT(remote_streams->at(0)->GetAudioTracks().size(), 0u);
1282 MediaStreamTrackInterface* remote_audio_track = 1311 MediaStreamTrackInterface* remote_audio_track =
1283 remote_streams->at(0)->GetAudioTracks()[0]; 1312 remote_streams->at(0)->GetAudioTracks()[0];
1284 EXPECT_TRUE_WAIT( 1313 EXPECT_TRUE_WAIT(
1285 initializing_client()->GetBytesReceivedStats(remote_audio_track) > 0, 1314 initializing_client()->GetBytesReceivedStats(remote_audio_track) > 0,
1286 kMaxWaitForStatsMs); 1315 kMaxWaitForStatsMs);
1287 1316
1288 MediaStreamTrackInterface* remote_video_track = 1317 MediaStreamTrackInterface* remote_video_track =
1289 remote_streams->at(0)->GetVideoTracks()[0]; 1318 remote_streams->at(0)->GetVideoTracks()[0];
1290 EXPECT_TRUE_WAIT( 1319 EXPECT_TRUE_WAIT(
1291 initializing_client()->GetBytesReceivedStats(remote_video_track) > 0, 1320 initializing_client()->GetBytesReceivedStats(remote_video_track) > 0,
1292 kMaxWaitForStatsMs); 1321 kMaxWaitForStatsMs);
1293 } 1322 }
1294 1323
1324 // Flaky on Mac Debug bots. See webrtc:5231
1325 #if defined(WEBRTC_MAC) && !defined(WEBRTC_IOS)
1326 #define MAYBE_GetBytesSentStats DISABLED_GetBytesSentStats
1327 #else
1328 #define MAYBE_GetBytesSentStats GetBytesSentStats
1329 #endif
1330
1295 // Test that we can get outgoing byte counts from both audio and video tracks. 1331 // Test that we can get outgoing byte counts from both audio and video tracks.
1296 TEST_F(JsepPeerConnectionP2PTestClient, GetBytesSentStats) { 1332 TEST_F(JsepPeerConnectionP2PTestClient, MAYBE_GetBytesSentStats) {
1297 ASSERT_TRUE(CreateTestClients()); 1333 ASSERT_TRUE(CreateTestClients());
1298 LocalP2PTest(); 1334 LocalP2PTest();
1299 1335
1300 StreamCollectionInterface* local_streams = 1336 StreamCollectionInterface* local_streams =
1301 initializing_client()->local_streams(); 1337 initializing_client()->local_streams();
1302 ASSERT_GT(local_streams->count(), 0u); 1338 ASSERT_GT(local_streams->count(), 0u);
1303 ASSERT_GT(local_streams->at(0)->GetAudioTracks().size(), 0u); 1339 ASSERT_GT(local_streams->at(0)->GetAudioTracks().size(), 0u);
1304 MediaStreamTrackInterface* local_audio_track = 1340 MediaStreamTrackInterface* local_audio_track =
1305 local_streams->at(0)->GetAudioTracks()[0]; 1341 local_streams->at(0)->GetAudioTracks()[0];
1306 EXPECT_TRUE_WAIT( 1342 EXPECT_TRUE_WAIT(
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
1338 rtc::SSL_PROTOCOL_DTLS_10, rtc::KT_DEFAULT))); 1374 rtc::SSL_PROTOCOL_DTLS_10, rtc::KT_DEFAULT)));
1339 1375
1340 EXPECT_EQ_WAIT(rtc::SrtpCryptoSuiteToName(kDefaultSrtpCryptoSuite), 1376 EXPECT_EQ_WAIT(rtc::SrtpCryptoSuiteToName(kDefaultSrtpCryptoSuite),
1341 initializing_client()->GetSrtpCipherStats(), 1377 initializing_client()->GetSrtpCipherStats(),
1342 kMaxWaitForStatsMs); 1378 kMaxWaitForStatsMs);
1343 EXPECT_EQ(1, 1379 EXPECT_EQ(1,
1344 init_observer->GetEnumCounter(webrtc::kEnumCounterAudioSrtpCipher, 1380 init_observer->GetEnumCounter(webrtc::kEnumCounterAudioSrtpCipher,
1345 kDefaultSrtpCryptoSuite)); 1381 kDefaultSrtpCryptoSuite));
1346 } 1382 }
1347 1383
1384 // Flaky on Mac Debug bots. See webrtc:5231
1385 #if defined(WEBRTC_MAC) && !defined(WEBRTC_IOS)
1386 #define MAYBE_GetDtls12Both DISABLED_GetDtls12Both
1387 #else
1388 #define MAYBE_GetDtls12Both GetDtls12Both
1389 #endif
1390
1348 // Test that DTLS 1.2 is used if both ends support it. 1391 // Test that DTLS 1.2 is used if both ends support it.
1349 TEST_F(JsepPeerConnectionP2PTestClient, GetDtls12Both) { 1392 TEST_F(JsepPeerConnectionP2PTestClient, MAYBE_GetDtls12Both) {
1350 PeerConnectionFactory::Options init_options; 1393 PeerConnectionFactory::Options init_options;
1351 init_options.ssl_max_version = rtc::SSL_PROTOCOL_DTLS_12; 1394 init_options.ssl_max_version = rtc::SSL_PROTOCOL_DTLS_12;
1352 PeerConnectionFactory::Options recv_options; 1395 PeerConnectionFactory::Options recv_options;
1353 recv_options.ssl_max_version = rtc::SSL_PROTOCOL_DTLS_12; 1396 recv_options.ssl_max_version = rtc::SSL_PROTOCOL_DTLS_12;
1354 ASSERT_TRUE( 1397 ASSERT_TRUE(
1355 CreateTestClients(nullptr, &init_options, nullptr, &recv_options)); 1398 CreateTestClients(nullptr, &init_options, nullptr, &recv_options));
1356 rtc::scoped_refptr<webrtc::FakeMetricsObserver> 1399 rtc::scoped_refptr<webrtc::FakeMetricsObserver>
1357 init_observer = new rtc::RefCountedObject<webrtc::FakeMetricsObserver>(); 1400 init_observer = new rtc::RefCountedObject<webrtc::FakeMetricsObserver>();
1358 initializing_client()->pc()->RegisterUMAObserver(init_observer); 1401 initializing_client()->pc()->RegisterUMAObserver(init_observer);
1359 LocalP2PTest(); 1402 LocalP2PTest();
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
1550 MAYBE_SKIP_TEST(rtc::SSLStreamAdapter::HaveDtlsSrtp); 1593 MAYBE_SKIP_TEST(rtc::SSLStreamAdapter::HaveDtlsSrtp);
1551 FakeConstraints constraints; 1594 FakeConstraints constraints;
1552 constraints.SetMandatory( 1595 constraints.SetMandatory(
1553 MediaConstraintsInterface::kEnableDtlsSrtp, true); 1596 MediaConstraintsInterface::kEnableDtlsSrtp, true);
1554 ASSERT_TRUE(CreateTestClients(&constraints, &constraints)); 1597 ASSERT_TRUE(CreateTestClients(&constraints, &constraints));
1555 initializing_client()->CreateDataChannel(); 1598 initializing_client()->CreateDataChannel();
1556 initializing_client()->Negotiate(false, false); 1599 initializing_client()->Negotiate(false, false);
1557 } 1600 }
1558 #endif 1601 #endif
1559 1602
1603 // Flaky on Mac Debug bots. See webrtc:5231
1604 #if defined(WEBRTC_MAC) && !defined(WEBRTC_IOS)
1605 #define MAYBE_IceRestart DISABLED_IceRestart
1606 #else
1607 #define MAYBE_IceRestart IceRestart
1608 #endif
1609
1560 // This test sets up a call between two parties with audio, and video. 1610 // This test sets up a call between two parties with audio, and video.
1561 // During the call, the initializing side restart ice and the test verifies that 1611 // During the call, the initializing side restart ice and the test verifies that
1562 // new ice candidates are generated and audio and video still can flow. 1612 // new ice candidates are generated and audio and video still can flow.
1563 TEST_F(JsepPeerConnectionP2PTestClient, IceRestart) { 1613 TEST_F(JsepPeerConnectionP2PTestClient, MAYBE_IceRestart) {
1564 ASSERT_TRUE(CreateTestClients()); 1614 ASSERT_TRUE(CreateTestClients());
1565 1615
1566 // Negotiate and wait for ice completion and make sure audio and video plays. 1616 // Negotiate and wait for ice completion and make sure audio and video plays.
1567 LocalP2PTest(); 1617 LocalP2PTest();
1568 1618
1569 // Create a SDP string of the first audio candidate for both clients. 1619 // Create a SDP string of the first audio candidate for both clients.
1570 const webrtc::IceCandidateCollection* audio_candidates_initiator = 1620 const webrtc::IceCandidateCollection* audio_candidates_initiator =
1571 initializing_client()->pc()->local_description()->candidates(0); 1621 initializing_client()->pc()->local_description()->candidates(0);
1572 const webrtc::IceCandidateCollection* audio_candidates_receiver = 1622 const webrtc::IceCandidateCollection* audio_candidates_receiver =
1573 receiving_client()->pc()->local_description()->candidates(0); 1623 receiving_client()->pc()->local_description()->candidates(0);
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after
1811 server.urls.push_back("stun:hostname"); 1861 server.urls.push_back("stun:hostname");
1812 server.urls.push_back("turn:hostname"); 1862 server.urls.push_back("turn:hostname");
1813 servers.push_back(server); 1863 servers.push_back(server);
1814 EXPECT_TRUE(webrtc::ParseIceServers(servers, &stun_configurations_, 1864 EXPECT_TRUE(webrtc::ParseIceServers(servers, &stun_configurations_,
1815 &turn_configurations_)); 1865 &turn_configurations_));
1816 EXPECT_EQ(1U, stun_configurations_.size()); 1866 EXPECT_EQ(1U, stun_configurations_.size());
1817 EXPECT_EQ(1U, turn_configurations_.size()); 1867 EXPECT_EQ(1U, turn_configurations_.size());
1818 } 1868 }
1819 1869
1820 #endif // if !defined(THREAD_SANITIZER) 1870 #endif // if !defined(THREAD_SANITIZER)
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698