test: address flaky test-http-client-timeout-event
authorRich Trott <rtrott@gmail.com>
Sun, 22 Nov 2015 04:10:52 +0000 (20:10 -0800)
committerJames M Snell <jasnell@gmail.com>
Wed, 23 Dec 2015 16:38:33 +0000 (08:38 -0800)
Use common.platformTimeout() to make test more reliable on Raspberry Pi.

Fixes: https://github.com/nodejs/node/issues/2555
PR-URL: https://github.com/nodejs/node/pull/3968

Reviewed-By: Brendan Ashworth <brendan.ashworth@me.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Roman Klauke <romaaan.git@gmail.com>
test/parallel/test-http-client-timeout-event.js

index c9d6594..aaa32e5 100644 (file)
@@ -33,8 +33,8 @@ server.listen(options.port, options.host, function() {
   setTimeout(function() {
     req.destroy();
     assert.equal(timeout_events, 1);
-  }, 100);
+  }, common.platformTimeout(100));
   setTimeout(function() {
     req.end();
-  }, 50);
+  }, common.platformTimeout(50));
 });