Bug 1116640, fix TestUrgentHangs on windows, r=billm. Not tested on current infra so DONTBUILD
authorBen Turner <bent.mozilla@gmail.com>
Mon, 05 Jan 2015 10:53:36 -0800
changeset 247880 4ed5726c356bed3a613c6c567264cdebe89433db
parent 247879 c7fdb9bfb6720d288c3cb13dcf4a7eeb4bb1b2d8
child 247881 72d7ae169b094ee14e59053a8ad1bdfc8e9e423e
push id4489
push userraliiev@mozilla.com
push dateMon, 23 Feb 2015 15:17:55 +0000
treeherdermozilla-beta@fd7c3dc24146 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbillm
bugs1116640
milestone37.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1116640, fix TestUrgentHangs on windows, r=billm. Not tested on current infra so DONTBUILD
ipc/ipdl/test/cxx/TestUrgentHangs.cpp
--- a/ipc/ipdl/test/cxx/TestUrgentHangs.cpp
+++ b/ipc/ipdl/test/cxx/TestUrgentHangs.cpp
@@ -1,14 +1,15 @@
 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
  * vim: sw=4 ts=4 et :
  */
 #include "TestUrgentHangs.h"
 
 #include "IPDLUnitTests.h"      // fail etc.
+#include "prthread.h"
 #if defined(OS_POSIX)
 #include <unistd.h>
 #else
 #include <windows.h>
 #endif
 
 template<>
 struct RunnableMethodTraits<mozilla::_ipdltest::TestUrgentHangsParent>
@@ -103,25 +104,25 @@ TestUrgentHangsChild::RecvTest1_1()
         fail("sending Test1_2");
 
     return true;
 }
 
 bool
 TestUrgentHangsChild::RecvTest1_3()
 {
-    sleep(2);
+    PR_Sleep(PR_SecondsToInterval(2));
 
     return true;
 }
 
 bool
 TestUrgentHangsChild::RecvTest2()
 {
-    sleep(2);
+    PR_Sleep(PR_SecondsToInterval(2));
 
     // Should fail because of the timeout.
     if (SendTestInner())
         fail("sending TestInner");
 
     return true;
 }
 
@@ -130,17 +131,17 @@ TestUrgentHangsChild::RecvTest3()
 {
     fail("RecvTest3 should never be called");
     return true;
 }
 
 bool
 TestUrgentHangsChild::RecvTest4()
 {
-    sleep(2);
+    PR_Sleep(PR_SecondsToInterval(2));
 
     // This should fail because Test4_1 timed out and hasn't gotten a response
     // yet.
     if (SendTestInner())
         fail("sending TestInner");
 
     return true;
 }