Uh oh!
There was an error while loading. Please reload this page.
test_runner: emit test-only diagnostic warning - #46540
Conversation
nodejs-github-bot
commented
Feb 7, 2023
Review requested:
|
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
3ee8044 to
e9bf7c1CompareUh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
8292f1b to
514fd0bCompareUh oh!
There was an error while loading. Please reload this page.
514fd0b to
5669292Compare
MoLow
left a comment
There was a problem hiding this comment.
LGTM, But I think we should emit a similar diagnostic when calling runOnly when no flag
@MoLow Are you referring to this scenario with // running without the --test-only flagconst{ test }=require('node:test');test('top level test',async(t)=>{t.runOnly(true);awaitt.test('this subtest is run');}); |
cjihrig
commented
Feb 11, 2023
I think @MoLow is saying to add the diagnostic when |
richiemccoll
commented
Feb 13, 2023
MoLow
commented
Feb 13, 2023
A follow-up PR is ok |
MoLow
commented
Feb 18, 2023
@richiemccoll this PR requires a rebase |
5669292 to
7696218Comparenodejs-github-bot
commented
Feb 20, 2023
nodejs-github-bot
commented
Feb 20, 2023
nodejs-github-bot
commented
Feb 21, 2023
nodejs-github-bot
commented
Feb 21, 2023
Landed in c90ea93 |
PR-URL: nodejs#46540Fixes: nodejs#46448 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Moshe Atlow <moshe@atlow.co.il> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
`Readable.toWeb(nodeStream)` is racy in current Node: when the client aborts mid-stream (iOS Safari range-probing an image then closing the socket, tab close mid-download, HTTP/2 RST_STREAM), the web-stream controller is closed first, but the adapter still tries to `controller.enqueue` any chunk the fs.ReadStream emits afterwards and throws `ERR_INVALID_STATE: Controller is already closed` as an uncaughtException, crashing the server. See nodejs/node#46540, #49936. Hand-roll the `ReadableStream` so we can: - destroy the node stream on consumer `cancel()`, - swallow late enqueue attempts after close, - keep `error` events from escaping to the process. Behaviour for the happy path (full read, range read, conditional GET) is unchanged.
Fixes: #46448
This PR:
{ only: true }orrunOnlyTests(true)without the--test-onlyCLI flag.