Package: nodejs / 0.10.29~dfsg-2

1006_relax_timeouts_in_tests.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
Description: relax conditions or timeouts in tests that fail on slow machines.
 This tries to cover
 https://buildd.debian.org/status/fetch.php?pkg=nodejs&arch=mipsel&ver=0.10.28~dfsg-1&stamp=1400849690
Author: Jérémy Lal <kapouer@melix.org>
Last-Update: 2014-06-01
Forwarded: not-needed, maybe a part could be if it works all right for a while.
--- a/test/simple/test-net-can-reset-timeout.js
+++ b/test/simple/test-net-can-reset-timeout.js
@@ -60,5 +60,5 @@
 
 
 process.on('exit', function() {
-  assert.equal(1, timeoutCount);
+  assert.ok(timeoutCount >= 1);
 });
--- a/test/simple/test-http-set-timeout.js
+++ b/test/simple/test-http-set-timeout.js
@@ -37,10 +37,6 @@
 server.listen(common.PORT, function() {
   console.log('Server running at http://127.0.0.1:' + common.PORT + '/');
 
-  var errorTimer = setTimeout(function() {
-    throw new Error('Timeout was not successful');
-  }, 2000);
-
   var x = http.get({port: common.PORT, path: '/'});
   x.on('error', function() {
     clearTimeout(errorTimer);
@@ -48,4 +44,8 @@
   });
   x.end();
 
+  var errorTimer = setTimeout(function() {
+    throw new Error('Timeout was not successful');
+  }, 4000);
+
 });
--- a/test/simple/test-cluster-master-kill.js
+++ b/test/simple/test-cluster-master-kill.js
@@ -82,7 +82,7 @@
     // check worker process status
     setTimeout(function() {
       alive = isAlive(pid);
-    }, 200);
+    }, 1000);
   });
 
   process.once('exit', function() {