Skip to content

Commit 411e772

Browse files
addaleaxMylesBorins
authored andcommitted
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: #17864 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Weijia Wang <[email protected]> Reviewed-By: Daniel Bevenius <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent 0aa403b commit 411e772

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

test/parallel/test-tls-invoke-queued.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,12 @@ const server = tls.createServer({
3636
key: fixtures.readKey('agent1-key.pem'),
3737
cert: fixtures.readKey('agent1-cert.pem')
3838
}, common.mustCall(function(c) {
39-
c._write('hello ', null, common.mustCall(function() {
40-
c._write('world!', null, common.mustCall(function() {
39+
c.write('hello ', null, common.mustCall(function() {
40+
c.write('world!', null, common.mustCall(function() {
4141
c.destroy();
4242
}));
4343
// Data on next _write() will be written but callback will not be invoked
44-
c._write(' gosh', null, common.mustNotCall());
44+
c.write(' gosh', null, common.mustNotCall());
4545
}));
4646

4747
server.close();

0 commit comments

Comments
 (0)