test: remove unused config

process.maxTickDepth was removed in v0.12 a whole while ago and was
mostly removed from our code base. There are still some places it was
left in old benchmarks and tests.

This PR removes setting the value in those tests and
benchmarks.

PR-URL: https://github.com/nodejs/node/pull/21985
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jon Moss <me@jonathanmoss.me>
This commit is contained in:
Benjamin Gruenbaum 2018-07-26 17:05:48 +03:00 committed by Jon Moss
parent 8d15f69abd
commit d68f946fe4
5 changed files with 6 additions and 15 deletions

View File

@ -5,8 +5,6 @@ const bench = common.createBenchmark(main, {
n: [12e6] n: [12e6]
}); });
process.maxTickDepth = Infinity;
function main({ n }) { function main({ n }) {
let counter = n; let counter = n;
function cb4(arg1, arg2, arg3, arg4) { function cb4(arg1, arg2, arg3, arg4) {

View File

@ -4,8 +4,6 @@ const bench = common.createBenchmark(main, {
n: [12e6] n: [12e6]
}); });
process.maxTickDepth = Infinity;
function main({ n }) { function main({ n }) {
let counter = n; let counter = n;
bench.start(); bench.start();

View File

@ -23,12 +23,8 @@
require('../common'); require('../common');
const assert = require('assert'); const assert = require('assert');
// this is the inverse of test-next-tick-starvation. // this is the inverse of test-next-tick-starvation. it verifies
// it verifies that process.nextTick will *always* come before other // that process.nextTick will *always* come before other events
// events, up to the limit of the process.maxTickDepth value.
// WARNING: unsafe!
process.maxTickDepth = Infinity;
let ran = false; let ran = false;
let starved = false; let starved = false;

View File

@ -22,13 +22,13 @@
'use strict'; 'use strict';
const common = require('../common'); const common = require('../common');
const Readable = require('stream').Readable; const Readable = require('stream').Readable;
// This tests synchronous read callbacks and verifies that even if they nest
// heavily the process handles it without an error
const r = new Readable(); const r = new Readable();
const N = 256 * 1024; const N = 256 * 1024;
// Go ahead and allow the pathological case for this test.
// Yes, it's an infinite loop, that's the point.
process.maxTickDepth = N + 2;
let reads = 0; let reads = 0;
r._read = function(n) { r._read = function(n) {
const chunk = reads++ === N ? null : Buffer.allocUnsafe(1); const chunk = reads++ === N ? null : Buffer.allocUnsafe(1);

View File

@ -39,7 +39,6 @@ if (process.argv[2] !== 'child') {
const domain = require('domain'); const domain = require('domain');
const d = domain.create(); const d = domain.create();
process.maxTickDepth = 10;
// in the error handler, we trigger several MakeCallback events // in the error handler, we trigger several MakeCallback events
d.on('error', function() { d.on('error', function() {