Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 0f7b51b

Browse files
committedJun 14, 2020
fixup
1 parent 7cbc07f commit 0f7b51b

File tree

2 files changed

+3
-13
lines changed

2 files changed

+3
-13
lines changed
 

‎test/parallel/test-http-outgoing-finish-writable.js

+2-9
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@ const common = require('../common');
33
const assert = require('assert');
44
const http = require('http');
55

6-
// Verify that after calling end() on an `OutgoingMessage` (or a type that
7-
// inherits from `OutgoingMessage`), its `writable` property is not set to false
8-
96
const server = http.createServer(common.mustCall(function(req, res) {
107
assert.strictEqual(res.writable, true);
118
assert.strictEqual(res.finished, false);
@@ -14,7 +11,7 @@ const server = http.createServer(common.mustCall(function(req, res) {
1411

1512
// res.writable is set to false after it has finished sending
1613
// Ref: https://github.com/nodejs/node/issues/15029
17-
assert.strictEqual(res.writable, true);
14+
assert.strictEqual(res.writable, false);
1815
assert.strictEqual(res.finished, true);
1916
assert.strictEqual(res.writableEnded, true);
2017

@@ -32,9 +29,5 @@ server.on('listening', common.mustCall(function() {
3229

3330
assert.strictEqual(clientRequest.writable, true);
3431
clientRequest.end();
35-
36-
// Writable is still true when close
37-
// THIS IS LEGACY, we cannot change it
38-
// unless we break error detection
39-
assert.strictEqual(clientRequest.writable, true);
32+
assert.strictEqual(clientRequest.writable, false);
4033
}));

‎test/parallel/test-http-writable-true-after-close.js

+1-4
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,13 @@ const common = require('../common');
44
const assert = require('assert');
55
const { get, createServer } = require('http');
66

7-
// res.writable should not be set to false after it has finished sending
8-
// Ref: https://github.com/nodejs/node/issues/15029
9-
107
let internal;
118
let external;
129

1310
// Proxy server
1411
const server = createServer(common.mustCall((req, res) => {
1512
const listener = common.mustCall(() => {
16-
assert.strictEqual(res.writable, true);
13+
assert.strictEqual(res.writable, false);
1714
});
1815

1916
// on CentOS 5, 'finish' is emitted

0 commit comments

Comments
 (0)
Please sign in to comment.