Skip to content

Commit dafaff3

Browse files
Benjamin Gruenbaumtargos
Benjamin Gruenbaum
authored andcommitted
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: #21985 Reviewed-By: Anatoli Papirovski <[email protected]> Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Jon Moss <[email protected]>
1 parent a569ae4 commit dafaff3

5 files changed

+6
-15
lines changed

benchmark/process/next-tick-depth-args.js

-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ const bench = common.createBenchmark(main, {
55
n: [12e6]
66
});
77

8-
process.maxTickDepth = Infinity;
9-
108
function main({ n }) {
119
let counter = n;
1210
function cb4(arg1, arg2, arg3, arg4) {

benchmark/process/next-tick-depth.js

-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ const bench = common.createBenchmark(main, {
44
n: [12e6]
55
});
66

7-
process.maxTickDepth = Infinity;
8-
97
function main({ n }) {
108
let counter = n;
119
bench.start();

test/parallel/test-next-tick-intentional-starvation.js

+2-6
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,8 @@
2323
require('../common');
2424
const assert = require('assert');
2525

26-
// this is the inverse of test-next-tick-starvation.
27-
// it verifies that process.nextTick will *always* come before other
28-
// events, up to the limit of the process.maxTickDepth value.
29-
30-
// WARNING: unsafe!
31-
process.maxTickDepth = Infinity;
26+
// this is the inverse of test-next-tick-starvation. it verifies
27+
// that process.nextTick will *always* come before other events
3228

3329
let ran = false;
3430
let starved = false;

test/parallel/test-stream2-read-sync-stack.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@
2222
'use strict';
2323
const common = require('../common');
2424
const Readable = require('stream').Readable;
25+
26+
// This tests synchronous read callbacks and verifies that even if they nest
27+
// heavily the process handles it without an error
28+
2529
const r = new Readable();
2630
const N = 256 * 1024;
2731

28-
// Go ahead and allow the pathological case for this test.
29-
// Yes, it's an infinite loop, that's the point.
30-
process.maxTickDepth = N + 2;
31-
3232
let reads = 0;
3333
r._read = function(n) {
3434
const chunk = reads++ === N ? null : Buffer.allocUnsafe(1);

test/sequential/test-next-tick-error-spin.js

-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ if (process.argv[2] !== 'child') {
3939

4040
const domain = require('domain');
4141
const d = domain.create();
42-
process.maxTickDepth = 10;
4342

4443
// in the error handler, we trigger several MakeCallback events
4544
d.on('error', function() {

0 commit comments

Comments
 (0)