From 36d28ce3b3deb89986e949f5e52245787e7c9230 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Sat, 26 Dec 2015 15:04:56 -0800 Subject: [PATCH] test: extend timeout in Debug mode MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Debug mode slows execution speed. There is work afoot to enable Debug mode runs on the continuous integration infrastructure for the project. Some tests are timing out, such as test-net-GH-5504.js. This change doubles the timeout returned from `common.platformTimeout()` when running in Debug mode. It also removes an unused variable from the aforementioned test-net-GH-5504.js. PR-URL: https://github.com/nodejs/node/pull/4431 Reviewed-By: Johan Bergström --- test/common.js | 3 +++ test/sequential/test-net-GH-5504.js | 1 - 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/test/common.js b/test/common.js index c1012e7a097688..5f18fec74a6945 100644 --- a/test/common.js +++ b/test/common.js @@ -255,6 +255,9 @@ exports.spawnPwd = function(options) { }; exports.platformTimeout = function(ms) { + if (process.config.target_defaults.default_configuration === 'Debug') + ms = 2 * ms; + if (process.arch !== 'arm') return ms; diff --git a/test/sequential/test-net-GH-5504.js b/test/sequential/test-net-GH-5504.js index 9526993dfd12c2..179b3ae3c2e241 100644 --- a/test/sequential/test-net-GH-5504.js +++ b/test/sequential/test-net-GH-5504.js @@ -1,6 +1,5 @@ 'use strict'; var common = require('../common'); -var assert = require('assert'); // this test only fails with CentOS 6.3 using kernel version 2.6.32 // On other linuxes and darwin, the `read` call gets an ECONNRESET in