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: deflake test-common-expect-warning #42046

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 3 additions & 1 deletion test/parallel/test-common-expect-warning.js
Expand Up @@ -36,9 +36,11 @@ if (process.argv[2] !== 'child') {
child.stderr.on('data', (data) => {
stderr += data;
});
child.stderr.on('end', common.mustCall(() => {
assert.match(stderr, /Unexpected extra warning received/);
}));
child.on('exit', common.mustCall((status) => {
assert.notStrictEqual(status, 0);
assert.match(stderr, /Unexpected extra warning received/);
Copy link
Member

Choose a reason for hiding this comment

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

Isn't the issue that the output is truncated?

Copy link
Member Author

@lpinca lpinca Feb 18, 2022

Choose a reason for hiding this comment

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

It could be, yes, but the process exits without errors so my guess is that data is written but read too soon. We should check if this changes anything on arm64 where, according to CI results, the issue reproduces more frequently.

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 actually misread. it's assert.notStrictEqual(status, 0).

}));
}
} else {
Expand Down