Bug 1061174 - Part 2 - Remove flaky timeout in test_udpsocket.html. r=khuey
authorShih-Chiang Chien <schien@mozilla.com>
Fri, 13 Mar 2015 16:46:37 +0800
changeset 233901 026b9ff345c14a0cca40e4132156e43c3dc2df0e
parent 233900 3a45d3607bccc6939ca7c4671293bf8106b5bbcb
child 233902 9af90dce2c8364a1c7f28638b0dbce94afcec680
push id28426
push usercbook@mozilla.com
push dateTue, 17 Mar 2015 10:46:54 +0000
treeherdermozilla-central@008b3f65a7e0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskhuey
bugs1061174
milestone39.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 1061174 - Part 2 - Remove flaky timeout in test_udpsocket.html. r=khuey
dom/network/tests/mochitest.ini
dom/network/tests/test_udpsocket.html
--- a/dom/network/tests/mochitest.ini
+++ b/dom/network/tests/mochitest.ini
@@ -19,9 +19,8 @@ skip-if = true # Bug 958689
 skip-if = true # Bug 958689, bug 858005
 [test_networkstats_disabled.html]
 skip-if = toolkit != "gonk"
 [test_networkstats_enabled_no_perm.html]
 skip-if = true # Bug 958689
 [test_networkstats_enabled_perm.html]
 skip-if = toolkit != "gonk"
 [test_udpsocket.html]
-skip-if = toolkit != "gonk" || (toolkit == 'gonk' && debug) # Bug 1061174 for B2G debug
--- a/dom/network/tests/test_udpsocket.html
+++ b/dom/network/tests/test_udpsocket.html
@@ -141,25 +141,19 @@ function testSendBigArray(socket) {
     let byteReceived = 0;
     socket.addEventListener('message', function recv_callback(msg) {
       let byteBegin = byteReceived;
       byteReceived += msg.data.byteLength;
       is(msg.remotePort, socket.localPort, 'expected packet from ' + socket.localPort);
       ok(is_same_buffer(msg.data, BIG_TYPED_ARRAY.subarray(byteBegin, byteReceived)), 'expected same buffer data [' + byteBegin+ '-' + byteReceived + ']');
       if (byteReceived >= BIG_TYPED_ARRAY.length) {
         socket.removeEventListener('message', recv_callback);
-        clearTimeout(timeout);
         resolve(socket);
       }
     });
-
-    let timeout = setTimeout(function() {
-      ok(false, 'timeout for sending big array');
-      resolve(socket);
-    }, 5000);
   });
 }
 
 function testSendBigBlob(socket) {
   info('test for sending Big Blob');
 
   let blob = new Blob([BIG_TYPED_ARRAY]);
   socket.send(blob, '127.0.0.1', socket.localPort);
@@ -168,25 +162,19 @@ function testSendBigBlob(socket) {
     let byteReceived = 0;
     socket.addEventListener('message', function recv_callback(msg) {
       let byteBegin = byteReceived;
       byteReceived += msg.data.byteLength;
       is(msg.remotePort, socket.localPort, 'expected packet from ' + socket.localPort);
       ok(is_same_buffer(msg.data, BIG_TYPED_ARRAY.subarray(byteBegin, byteReceived)), 'expected same buffer data [' + byteBegin+ '-' + byteReceived + ']');
       if (byteReceived >= BIG_TYPED_ARRAY.length) {
         socket.removeEventListener('message', recv_callback);
-        clearTimeout(timeout);
         resolve(socket);
       }
     });
-
-    let timeout = setTimeout(function() {
-      ok(false, 'timeout for sending big blob');
-      resolve(socket);
-    }, 5000);
   });
 }
 
 function testUDPOptions(socket) {
   info('test for UDP init options');
 
   let remoteSocket = new UDPSocket({addressReuse: false,
                                     loopback: true,