Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: remove unused config #21985

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions benchmark/process/next-tick-depth-args.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ const bench = common.createBenchmark(main, {
n: [12e6]
});

process.maxTickDepth = Infinity;

function main({ n }) {
let counter = n;
function cb4(arg1, arg2, arg3, arg4) {
Expand Down
2 changes: 0 additions & 2 deletions benchmark/process/next-tick-depth.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ const bench = common.createBenchmark(main, {
n: [12e6]
});

process.maxTickDepth = Infinity;

function main({ n }) {
let counter = n;
bench.start();
Expand Down
8 changes: 2 additions & 6 deletions test/parallel/test-next-tick-intentional-starvation.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,8 @@
require('../common');
const assert = require('assert');

// this is the inverse of test-next-tick-starvation.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we keep the test description (these 3 lines)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, can revert this - though I didn't find it very informative if you do I'll revert.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll revert except the third line

// it verifies that process.nextTick will *always* come before other
// events, up to the limit of the process.maxTickDepth value.

// WARNING: unsafe!
process.maxTickDepth = Infinity;
// this is the inverse of test-next-tick-starvation. it verifies
// that process.nextTick will *always* come before other events

let ran = false;
let starved = false;
Expand Down
8 changes: 4 additions & 4 deletions test/parallel/test-stream2-read-sync-stack.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@
'use strict';
const common = require('../common');
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 N = 256 * 1024;

// Go ahead and allow the pathological case for this test.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It no longer allows the pathological use case though since maxTickDepth was removed so the comment is incorrect (and has been since 0.12). Is there alternative phrasing you'd prefer?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did not associate the comment specifically with maxTickDepth. If you are sure it's related, then I would assume the whole test is obsolete, and should be removed.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@refack the test verifies the behaviour of a synchronous read on the stream. I've added a comment I think makes the most sense. I think benjamingr@782149d explains why it was added

// Yes, it's an infinite loop, that's the point.
process.maxTickDepth = N + 2;

let reads = 0;
r._read = function(n) {
const chunk = reads++ === N ? null : Buffer.allocUnsafe(1);
Expand Down
1 change: 0 additions & 1 deletion test/sequential/test-next-tick-error-spin.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ if (process.argv[2] !== 'child') {

const domain = require('domain');
const d = domain.create();
process.maxTickDepth = 10;

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