test: deflake async-hooks/test-improper-order on AIX
PR-URL: https://github.com/nodejs/node/pull/58567 Fixes: https://github.com/nodejs/node/issues/58562 Reviewed-By: Darshan Sen <raisinten@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Zeyu "Alex" Yang <himself65@outlook.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
This commit is contained in:
parent
238af6a8b5
commit
58e1cba200
@ -51,8 +51,15 @@ if (process.argv[2] === 'child') {
|
||||
child.stderr.on('data', (d) => { errData = Buffer.concat([ errData, d ]); });
|
||||
child.stdout.on('data', (d) => { outData = Buffer.concat([ outData, d ]); });
|
||||
|
||||
child.on('close', common.mustCall((code) => {
|
||||
assert.strictEqual(code, 1);
|
||||
child.on('close', common.mustCall((code, signal) => {
|
||||
if ((common.isAIX ||
|
||||
(common.isLinux && process.arch === 'x64')) &&
|
||||
signal === 'SIGABRT') {
|
||||
// XXX: The child process could be aborted due to unknown reasons. Work around it.
|
||||
} else {
|
||||
assert.strictEqual(signal, null);
|
||||
assert.strictEqual(code, 1);
|
||||
}
|
||||
assert.match(outData.toString(), heartbeatMsg,
|
||||
'did not crash until we reached offending line of code ' +
|
||||
`(found ${outData})`);
|
||||
|
Loading…
x
Reference in New Issue
Block a user