From 24c71fb47cd772d4b4f8f3d55e5be24ba7a43342 Mon Sep 17 00:00:00 2001 From: Anna Henningsen Date: Mon, 25 Dec 2017 21:38:10 +0100 Subject: [PATCH] test: make test-tls-invoke-queued use public API `parallel/test-tls-invoke-queued` previously used the internal `_write()` API to hook into the internals more directly, but this invalidates the general assumption made by streams APIs that only a single write is active at a time, and which is enforced through the public API. PR-URL: https://github.com/nodejs/node/pull/17864 Reviewed-By: Colin Ihrig Reviewed-By: Weijia Wang Reviewed-By: Daniel Bevenius Reviewed-By: James M Snell --- test/parallel/test-tls-invoke-queued.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/parallel/test-tls-invoke-queued.js b/test/parallel/test-tls-invoke-queued.js index 578ee4cbfd7..754b02ba0ba 100644 --- a/test/parallel/test-tls-invoke-queued.js +++ b/test/parallel/test-tls-invoke-queued.js @@ -36,12 +36,12 @@ const server = tls.createServer({ key: fixtures.readKey('agent1-key.pem'), cert: fixtures.readKey('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();