Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: make test-tls-invoke-queued use public API #17864

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.
addaleax committed Dec 25, 2017

Verified

This commit was signed with the committer’s verified signature.
targos Michaël Zasso
commit 2c86c705a72b509c564df98dd7e53fba3970dc1e
6 changes: 3 additions & 3 deletions test/parallel/test-tls-invoke-queued.js
Original file line number Diff line number Diff line change
@@ -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();