-
-
Notifications
You must be signed in to change notification settings - Fork 33.8k
Closed
Labels
flaky-testIssues and PRs related to the tests with unstable failures on the CI.Issues and PRs related to the tests with unstable failures on the CI.streamIssues and PRs related to the stream subsystem.Issues and PRs related to the stream subsystem.
Description
Test
test-stream-finished
Platform
not specific on a single platform
Console output
node:assert:124
throw new AssertionError(obj);
^
AssertionError [ERR_ASSERTION]: Expected values to be strictly equal:
+ actual - expected
+ Error [ERR_STREAM_PREMATURE_CLOSE]: Premature close
+ at new NodeError (node:internal/errors:387:5)
+ at ServerResponse.onclose (node:internal/streams/end-of-stream:147:30)
+ at ServerResponse.emit (node:events:549:35)
+ at emitCloseNT (node:_http_server:904:10)
+ at Socket.onServerResponseClose (node:_http_server:257:5)
+ at Socket.emit (node:events:549:35)
+ at TCP.<anonymous> (node:net:756:14) {
+ code: 'ERR_STREAM_PREMATURE_CLOSE'
+ }
- undefined
at ServerResponse.<anonymous> (/Users/iojs/build/workspace/node-test-commit-osx/nodes/osx11-x64/test/parallel/test-stream-finished.js:656:14)
at ServerResponse.<anonymous> (/Users/iojs/build/workspace/node-test-commit-osx/nodes/osx11-x64/test/common/index.js:438:15)
at ServerResponse.<anonymous> (node:internal/util:445:5)
at ServerResponse.onclose (node:internal/streams/end-of-stream:146:25)
at ServerResponse.emit (node:events:549:35)
at emitCloseNT (node:_http_server:904:10)
at Socket.onServerResponseClose (node:_http_server:257:5)
at Socket.emit (node:events:549:35)
at TCP.<anonymous> (node:net:756:14) {
generatedMessage: true,
code: 'ERR_ASSERTION',
actual: Error [ERR_STREAM_PREMATURE_CLOSE]: Premature close
at new NodeError (node:internal/errors:387:5)
at ServerResponse.onclose (node:internal/streams/end-of-stream:147:30)
at ServerResponse.emit (node:events:549:35)
at emitCloseNT (node:_http_server:904:10)
at Socket.onServerResponseClose (node:_http_server:257:5)
at Socket.emit (node:events:549:35)
at TCP.<anonymous> (node:net:756:14) {
code: 'ERR_STREAM_PREMATURE_CLOSE'
},
expected: undefined,
operator: 'strictEqual'
}
Node.js v19.0.0-preBuild links
Additional information
I can reproduce it on my macOS 12.2.1:
$ repeat 200 ./node test/parallel/test-stream-finished.js
node:assert:124
throw new AssertionError(obj);
^
AssertionError [ERR_ASSERTION]: Expected values to be strictly equal:
+ actual - expected
+ Error [ERR_STREAM_PREMATURE_CLOSE]: Premature close
+ at new NodeError (node:internal/errors:387:5)
+ at ServerResponse.onclose (node:internal/streams/end-of-stream:147:30)
+ at ServerResponse.emit (node:events:549:35)
+ at emitCloseNT (node:_http_server:904:10)
+ at Socket.onServerResponseClose (node:_http_server:257:5)
+ at Socket.emit (node:events:549:35)
+ at TCP.<anonymous> (node:net:756:14) {
+ code: 'ERR_STREAM_PREMATURE_CLOSE'
+ }
- undefined
at ServerResponse.<anonymous> (/Users/feng/Projects/node/test/parallel/test-stream-finished.js:656:14)
at ServerResponse.<anonymous> (/Users/feng/Projects/node/test/common/index.js:438:15)
at ServerResponse.<anonymous> (node:internal/util:445:5)
at ServerResponse.onclose (node:internal/streams/end-of-stream:146:25)
at ServerResponse.emit (node:events:549:35)
at emitCloseNT (node:_http_server:904:10)
at Socket.onServerResponseClose (node:_http_server:257:5)
at Socket.emit (node:events:549:35)
at TCP.<anonymous> (node:net:756:14) {
generatedMessage: true,
code: 'ERR_ASSERTION',
actual: Error [ERR_STREAM_PREMATURE_CLOSE]: Premature close
at new NodeError (node:internal/errors:387:5)
at ServerResponse.onclose (node:internal/streams/end-of-stream:147:30)
at ServerResponse.emit (node:events:549:35)
at emitCloseNT (node:_http_server:904:10)
at Socket.onServerResponseClose (node:_http_server:257:5)
at Socket.emit (node:events:549:35)
at TCP.<anonymous> (node:net:756:14) {
code: 'ERR_STREAM_PREMATURE_CLOSE'
},
expected: undefined,
operator: 'strictEqual'
}
Node.js v19.0.0-preRelated test:
node/test/parallel/test-stream-finished.js
Lines 652 to 667 in 350a6a8
| { | |
| const server = http.createServer(common.mustCall(function(req, res) { | |
| fs.createReadStream(__filename).pipe(res); | |
| finished(res, common.mustCall(function(err) { | |
| assert.strictEqual(err, undefined); | |
| })); | |
| })).listen(0, function() { | |
| http.request( | |
| { method: 'GET', port: this.address().port }, | |
| common.mustCall(function(res) { | |
| res.resume(); | |
| server.close(); | |
| }) | |
| ).end(); | |
| }); | |
| } |
It seems like caused by a regression, this sub-test is added at #40941 by @ronag 8 months ago.
Metadata
Metadata
Assignees
Labels
flaky-testIssues and PRs related to the tests with unstable failures on the CI.Issues and PRs related to the tests with unstable failures on the CI.streamIssues and PRs related to the stream subsystem.Issues and PRs related to the stream subsystem.