Bug 1136252 - Part 3: Remove some unnecessary sleeps in signaling_unittests. r=mt
authorByron Campen [:bwc] <docfaraday@gmail.com>
Fri, 06 Mar 2015 15:16:38 -0800
changeset 233578 00ee5c75c36b5d5804d4ead837d181f30c194dd0
parent 233577 77605be85deb84e950ee48335f981d4cf8933638
child 233579 6519a9e7d3d8c14b1fe173859fae4615ed6648f6
push id11769
push userryanvm@gmail.com
push dateFri, 13 Mar 2015 20:11:11 +0000
treeherderfx-team@38154607d807 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmt
bugs1136252
milestone39.0a1
Bug 1136252 - Part 3: Remove some unnecessary sleeps in signaling_unittests. r=mt
media/webrtc/signaling/test/signaling_unittests.cpp
--- a/media/webrtc/signaling/test/signaling_unittests.cpp
+++ b/media/webrtc/signaling/test/signaling_unittests.cpp
@@ -3599,17 +3599,16 @@ TEST_P(SignalingTest, AddCandidateInHave
             a1_->pObserver->lastAddIceStatusCode);
 }
 
 TEST_F(SignalingAgentTest, CreateOffer) {
   CreateAgent(TestStunServer::GetInstance()->addr(),
               TestStunServer::GetInstance()->port());
   OfferOptions options;
   agent(0)->CreateOffer(options, OFFER_AUDIO, SHOULD_SENDRECV_AUDIO);
-  PR_Sleep(20000);
 }
 
 TEST_F(SignalingAgentTest, CreateOfferSetLocalTrickleTestServer) {
   TestStunServer::GetInstance()->SetActive(false);
   TestStunServer::GetInstance()->SetResponseAddr(
       kBogusSrflxAddress, kBogusSrflxPort);
 
   CreateAgent(
@@ -3621,17 +3620,16 @@ TEST_F(SignalingAgentTest, CreateOfferSe
 
   // Verify that the bogus addr is not there.
   ASSERT_FALSE(agent(0)->OfferContains(kBogusSrflxAddress));
 
   // Now enable the STUN server.
   TestStunServer::GetInstance()->SetActive(true);
 
   agent(0)->SetLocal(TestObserver::OFFER, agent(0)->offer());
-  PR_Sleep(1000); // Give time for the message queues.
   agent(0)->WaitForGather();
 
   // Verify that we got our candidates.
   ASSERT_LE(2U, agent(0)->MatchingCandidates(kBogusSrflxAddress));
 
   // Verify that the candidates appear in the offer.
   size_t match;
   match = agent(0)->getLocalDescription().find(kBogusSrflxAddress);
@@ -4202,17 +4200,17 @@ TEST_P(SignalingTest, AudioCallMismatchD
             << indent(answer) << std::endl;
 
   // This should setup the DTLS with both sides playing active
   a1_->SetRemote(TestObserver::ANSWER, answer, false);
 
   WaitForCompleted();
 
   // Not using ASSERT_TRUE_WAIT here because we expect failure
-  PR_Sleep(kDefaultTimeout * 2); // Wait for some data to get written
+  PR_Sleep(500); // Wait for some data to get written
 
   CloseStreams();
 
   ASSERT_GE(a1_->GetPacketsSent(0), 4);
   // In this case we should receive nothing.
   ASSERT_EQ(a2_->GetPacketsReceived(0), 0);
 }