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

Unified Diff: webrtc/pc/peerconnection_integrationtest.cc

Issue 2855573004: Unflaking PeerConnectionIntegrationTest.DtmfSenderObserver. (Closed)
Patch Set: Created 3 years, 8 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/pc/peerconnection_integrationtest.cc
diff --git a/webrtc/pc/peerconnection_integrationtest.cc b/webrtc/pc/peerconnection_integrationtest.cc
index 0ee4cbd7193e9bc5ef33aa6c4ba83ea413da0d72..2c19c8d93ebfd1360207b873fd73aeb65f0f6635 100644
--- a/webrtc/pc/peerconnection_integrationtest.cc
+++ b/webrtc/pc/peerconnection_integrationtest.cc
@@ -958,6 +958,20 @@ class PeerConnectionIntegrationTest : public testing::Test {
return caller_->SignalingStateStable() && callee_->SignalingStateStable();
}
+ bool DtlsConnected() {
+ // TODO(deadbeef): kIceConnectionConnected currently means both ICE and DTLS
+ // are connected. This is an important distinction. Once we have separate
+ // ICE and DTLS state, this check needs to use the DTLS state.
+ return (callee()->ice_connection_state() ==
+ webrtc::PeerConnectionInterface::kIceConnectionConnected ||
+ callee()->ice_connection_state() ==
+ webrtc::PeerConnectionInterface::kIceConnectionCompleted) &&
+ (caller()->ice_connection_state() ==
+ webrtc::PeerConnectionInterface::kIceConnectionConnected ||
+ caller()->ice_connection_state() ==
+ webrtc::PeerConnectionInterface::kIceConnectionCompleted);
+ }
+
bool CreatePeerConnectionWrappers() {
return CreatePeerConnectionWrappersWithConfig(
PeerConnectionInterface::RTCConfiguration(),
@@ -1245,6 +1259,8 @@ TEST_F(PeerConnectionIntegrationTest, DtmfSenderObserver) {
callee()->AddAudioOnlyMediaStream();
caller()->CreateAndSetAndSignalOffer();
ASSERT_TRUE_WAIT(SignalingStateStable(), kDefaultTimeout);
+ // DTLS must finish before the DTMF sender can be used reliably.
+ ASSERT_TRUE_WAIT(DtlsConnected(), kDefaultTimeout);
TestDtmfFromSenderToReceiver(caller(), callee());
TestDtmfFromSenderToReceiver(callee(), caller());
}
@@ -2781,19 +2797,8 @@ TEST_F(PeerConnectionIntegrationTest, EndToEndConnectionTimeWithTurnTurnPair) {
options.offer_to_receive_video = 1;
caller()->SetOfferAnswerOptions(options);
caller()->CreateAndSetAndSignalOffer();
- // TODO(deadbeef): kIceConnectionConnected currently means both ICE and DTLS
- // are connected. This is an important distinction. Once we have separate ICE
- // and DTLS state, this check needs to use the DTLS state.
- EXPECT_TRUE_SIMULATED_WAIT(
- (callee()->ice_connection_state() ==
- webrtc::PeerConnectionInterface::kIceConnectionConnected ||
- callee()->ice_connection_state() ==
- webrtc::PeerConnectionInterface::kIceConnectionCompleted) &&
- (caller()->ice_connection_state() ==
- webrtc::PeerConnectionInterface::kIceConnectionConnected ||
- caller()->ice_connection_state() ==
- webrtc::PeerConnectionInterface::kIceConnectionCompleted),
- total_connection_time_ms, fake_clock);
+ EXPECT_TRUE_SIMULATED_WAIT(DtlsConnected(), total_connection_time_ms,
+ fake_clock);
// Need to free the clients here since they're using things we created on
// the stack.
delete SetCallerPcWrapperAndReturnCurrent(nullptr);
« 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