mirror of
https://github.com/zebrajr/node.git
synced 2025-12-06 00:20:08 +01:00
test: remove deadlock workaround
PR-URL: https://github.com/nodejs/node/pull/58047 Refs: https://github.com/nodejs/node/pull/47452 Refs: https://github.com/nodejs/node/issues/54918 Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
This commit is contained in:
parent
6de55f7ffb
commit
c2d81569d5
|
|
@ -1,4 +1,3 @@
|
|||
// Flags: --expose-gc
|
||||
'use strict';
|
||||
|
||||
// Test that 'close' emits once and not twice when `emitClose: true` is set.
|
||||
|
|
@ -18,8 +17,4 @@ const fileWriteStream = fs.createWriteStream(filepath, {
|
|||
});
|
||||
|
||||
fileReadStream.pipe(fileWriteStream);
|
||||
fileWriteStream.on('close', common.mustCall(() => {
|
||||
// TODO(lpinca): Remove the forced GC when
|
||||
// https://github.com/nodejs/node/issues/54918 is fixed.
|
||||
globalThis.gc({ type: 'major' });
|
||||
}));
|
||||
fileWriteStream.on('close', common.mustCall());
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ const server = net.createServer(common.mustCall(function(conn) {
|
|||
}
|
||||
|
||||
while (conn.write(Buffer.from(data)));
|
||||
globalThis.gc({ type: 'major' });
|
||||
globalThis.gc({ type: 'minor' });
|
||||
// The buffer allocated above should still be alive.
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ const server = net.createServer(common.mustCall(function(conn) {
|
|||
}
|
||||
|
||||
while (conn.write(data, 'hex'));
|
||||
globalThis.gc({ type: 'major' });
|
||||
globalThis.gc({ type: 'minor' });
|
||||
// The buffer allocated inside the .write() call should still be alive.
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user