Skip to content

Commit abd5b5f

Browse files
bakigul1aduh95
authored andcommitted
test: deflake async-hooks/test-improper-order on AIX
PR-URL: #58567Fixes: #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>
1 parent daf65d4 commit abd5b5f

1 file changed

Lines changed: 9 additions & 2 deletions

File tree

‎test/async-hooks/test-improper-order.js‎

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,15 @@ if (process.argv[2] === 'child') {
5151
child.stderr.on('data',(d)=>{errData=Buffer.concat([errData,d]);});
5252
child.stdout.on('data',(d)=>{outData=Buffer.concat([outData,d]);});
5353

54-
child.on('close',common.mustCall((code)=>{
55-
assert.strictEqual(code,1);
54+
child.on('close',common.mustCall((code,signal)=>{
55+
if((common.isAIX||
56+
(common.isLinux&&process.arch==='x64'))&&
57+
signal==='SIGABRT'){
58+
// XXX: The child process could be aborted due to unknown reasons. Work around it.
59+
}else{
60+
assert.strictEqual(signal,null);
61+
assert.strictEqual(code,1);
62+
}
5663
assert.match(outData.toString(),heartbeatMsg,
5764
'did not crash until we reached offending line of code '+
5865
`(found ${outData})`);

0 commit comments

Comments
 (0)