From ef9b21777e900e0b9fc1eb36a2fbf7139d2eb33d Mon Sep 17 00:00:00 2001 From: conectado Date: Wed, 25 Jul 2018 01:35:55 -0300 Subject: [PATCH 1/3] test: update setTimeout to use common.platformTimeout Changes the time used by the last line of the file to normalize the timeout by using the common library. --- test/internet/test-net-connect-unref.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/internet/test-net-connect-unref.js b/test/internet/test-net-connect-unref.js index da4c77de4840c0..ba08d1452b7634 100644 --- a/test/internet/test-net-connect-unref.js +++ b/test/internet/test-net-connect-unref.js @@ -31,4 +31,4 @@ const client = net.createConnection(53, '8.8.8.8', function() { client.on('close', common.mustNotCall()); -setTimeout(common.mustNotCall(), TIMEOUT).unref(); +setTimeout(common.mustNotCall(), common.platformTimeout(TIMEOUT)).unref(); From dbfffbf0f124c1ea95706d9c81ddaf405e4cb789 Mon Sep 17 00:00:00 2001 From: conectado Date: Wed, 25 Jul 2018 18:58:50 -0300 Subject: [PATCH 2/3] test: remove setTimeout from the file Removes the setTimeout since if the test were to fail it would time out due to the tools/test.py wrapper --- test/internet/test-net-connect-unref.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/test/internet/test-net-connect-unref.js b/test/internet/test-net-connect-unref.js index ba08d1452b7634..b34c198b245784 100644 --- a/test/internet/test-net-connect-unref.js +++ b/test/internet/test-net-connect-unref.js @@ -30,5 +30,3 @@ const client = net.createConnection(53, '8.8.8.8', function() { }); client.on('close', common.mustNotCall()); - -setTimeout(common.mustNotCall(), common.platformTimeout(TIMEOUT)).unref(); From 548e70b9d2409402e562b001deaa4f81d218a865 Mon Sep 17 00:00:00 2001 From: conectado Date: Wed, 25 Jul 2018 20:00:55 -0300 Subject: [PATCH 3/3] test: remove unused TIMEOUT variable --- test/internet/test-net-connect-unref.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/test/internet/test-net-connect-unref.js b/test/internet/test-net-connect-unref.js index b34c198b245784..434b8077c0ab7e 100644 --- a/test/internet/test-net-connect-unref.js +++ b/test/internet/test-net-connect-unref.js @@ -23,8 +23,6 @@ const common = require('../common'); const net = require('net'); -const TIMEOUT = 10 * 1000; - const client = net.createConnection(53, '8.8.8.8', function() { client.unref(); });