summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnna Henningsen <anna@addaleax.net>2017-12-25 21:38:10 +0100
committerMyles Borins <mylesborins@google.com>2018-02-12 19:28:28 -0500
commit8c1f41fc111db0a0fd2338cb0075b3faaafe2e66 (patch)
tree83f9d3ca31489dbfcc55a276bf322e8ba5be9611
parent4b4e4db1c15900ba2f56375175bb207256fecb34 (diff)
downloadnode-new-8c1f41fc111db0a0fd2338cb0075b3faaafe2e66.tar.gz
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 <cjihrig@gmail.com> Reviewed-By: Weijia Wang <starkwang@126.com> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
-rw-r--r--test/parallel/test-tls-invoke-queued.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/parallel/test-tls-invoke-queued.js b/test/parallel/test-tls-invoke-queued.js
index 3d4cb8b00f..159d436e81 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();