Skip to content

Commit

Permalink
test: extend timeout in Debug mode
Browse files Browse the repository at this point in the history
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: #4431
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
  • Loading branch information
Trott authored and Myles Borins committed Jan 19, 2016
1 parent 6e4598d commit 0d5a508
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 3 additions & 0 deletions test/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
1 change: 0 additions & 1 deletion test/sequential/test-net-GH-5504.js
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit 0d5a508

Please sign in to comment.