diff --git a/test/parallel/test-tls-invoke-queued.js b/test/parallel/test-tls-invoke-queued.js index 3d4cb8b00f3af0..159d436e81f7fa 100644 --- a/test/parallel/test-tls-invoke-queued.js +++ b/test/parallel/test-tls-invoke-queued.js @@ -14,12 +14,12 @@ const server = tls.createServer({ key: fs.readFileSync(`${common.fixturesDir}/keys/agent1-key.pem`), cert: fs.readFileSync(`${common.fixturesDir}/keys/agent1-cert.pem`) }, common.mustCall(function(c) { - c._write('hello ', null, common.mustCall(function() { - c._write('world!', null, common.mustCall(function() { + c.write('hello ', null, common.mustCall(function() { + c.write('world!', null, common.mustCall(function() { c.destroy(); })); // Data on next _write() will be written but callback will not be invoked - c._write(' gosh', null, common.mustNotCall()); + c.write(' gosh', null, common.mustNotCall()); })); server.close();